text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
-Steven Norris </div> <div class="prevaddedbuttons"> <input class="button" type="submit" value="Edit" />
[ 0.08111260086297989, -0.2537890076637268, 0.01152090635150671, 0.09073714911937714, -0.41660797595977783, 0.9075071811676025, 0.12349581718444824, -0.39852020144462585, -0.13046561181545258, -0.4196080267429352, -0.3188261389732361, 0.5868872404098511, -0.1359330415725708, -0.3426632881164...
<input class="button" type="submit" value="Delete" /> </div> </div> </div> </div> </div> </body> </html> ``` CSS ``` /** * Overall stylesheet for PFS Special OPS * Created By Steven T. Norris on 4/3/2012 * Last Updated:
[ -0.07817859947681427, -0.06862621009349823, 0.2177487462759018, -0.08548462390899658, -0.32619941234588623, 0.26121869683265686, 0.2043340802192688, -0.5117409229278564, -0.19878533482551575, -0.8607248663902283, -0.4306442439556122, 0.07505327463150024, -0.191720649600029, -0.334730267524...
Last Updated By: */ /* * Overall Navigation * #navigation min-width mirrors .tab widths + #logoimg width + 200px allowance for #welcome width * #navigation height mirrors #logoimg height */ #navigation { min-width:677px; vertical-align:bottom; border-bottom-style:solid; border-bottom-width:2px; bor...
[ -0.3471848964691162, -0.03113965131342411, 1.1303176879882812, 0.15712952613830566, 0.092076376080513, 0.2972002327442169, 0.2742146849632263, -0.08021373301744461, -0.457693487405777, -0.8639419078826904, -0.1955268830060959, 0.43499597907066345, 0.03086552768945694, -0.06257666647434235,...
width:100px; margin-right:5px; padding:2px; position:relative; top:76px; left:20px; font-size:large; background-image:url('../Images/blueTab.png'); text-align:center; } .tablink { color:Black; text-decoration:none; } .tablink:hover { cursor:pointer; color:white; } .tabspa...
[ -0.751874566078186, 0.03087962046265602, 0.8999797105789185, 0.1450573056936264, -0.011326209641993046, 0.6519712209701538, 0.11569029092788696, -0.2783608138561249, -0.14178802073001862, -0.5266183614730835, -0.6741437315940857, 0.1666133850812912, -0.04695381969213486, -0.128904581069946...
border-bottom-color:black; } /* * Logo * #logospacer width mirrors #logoimg width */ #logo { float:left; } #logoimg { width:130px; height:100px; } #logospacer { width:130px; height:1px; float:left; clear:left; } /* * Content * #content min-width mirrors #navigation * #content background-co...
[ -0.07898327708244324, 0.18159590661525726, 1.1809903383255005, 0.24786773324012756, 0.07448786497116089, 0.1557835042476654, 0.1541697233915329, -0.06914588063955307, -0.3113941550254822, -0.7498945593833923, -0.38155925273895264, 0.2975309193134308, -0.04671189934015274, 0.000284606183413...
height, padding, and top mirrors .tab */ #welcome { float:right; height:20px; position:relative; padding:2px; top:76px; font-weight:bold; } /* * Spacers * #spacer min-width mirrors #navigation * #highlightspacer background-color mirrors ./Images/blueTab.png bottom color */ #spacer { min-wi...
[ -0.27149736881256104, -0.018169846385717392, 0.8824731111526489, 0.27979961037635803, -0.14165805280208588, 0.11554662138223648, 0.035249095410108566, -0.2171478271484375, -0.16404223442077637, -0.4079604148864746, -0.5382031202316284, 0.3163444995880127, -0.0021171891130506992, 0.13932837...
font-weight:bold; } /* * Buttons */ .button { background:url('../Images/blueButton.png'); border-style:none; width:100px; height:20px; } .button:hover { cursor:pointer; } /* * Stylesheet for my additions page of Special OPS * Created by St...
[ -0.04842536896467209, -0.026379188522696495, 0.5525346994400024, 0.10356543958187103, 0.25238505005836487, 0.7317221760749817, -0.04117570444941521, -0.30310389399528503, -0.30723848938941956, -0.8859798908233643, -0.33136457204818726, 0.16806121170520782, -0.06272713094949722, -0.43407353...
T. Norris on 4/4/2012 * Last Update: Update By: */ #addnews { border-style:solid; border-width:1px; border-color:Black; padding:3px; } #addnewstbl { width:100%; } .addnewsform { width:98%; } .addnewstitlecell { width:100px; vertical-align:top; } #prevadded { border-style:sol...
[ -0.002980362856760621, -0.15724605321884155, 0.7996377944946289, -0.01817426271736622, -0.08689981698989868, 0.331112802028656, 0.6478579044342041, -0.5975227355957031, -0.12666864693164825, -0.7978171706199646, -0.3421124815940857, 0.36780813336372375, -0.036476265639066696, -0.0088550746...
Simply stated : What is a Java Object Model. I want to create one for a XML file. I am sure it is different than the Java Application. SO what is it. Obviously, i tried google but to my surprise didnot get any specific or clear answer. An object model is a set of classes (with their properties and methods) used to repr...
[ 0.16183055937290192, -0.049644265323877335, -0.2568214237689972, 0.33708882331848145, -0.19441093504428864, -0.06243392080068588, -0.00985766388475895, 0.2436496913433075, -0.21331916749477386, -0.5503291487693787, 0.12428385764360428, 0.22179578244686127, -0.35266152024269104, 0.282412409...
you need to analyze what information is held in your XML file and design Java classes to represent the same information. There are tools that can automate this process, though the representation they come up with will not always be optimal.
[ 0.2002866417169571, 0.06549788266420364, -0.08074098080396652, 0.4666852355003357, 0.15416182577610016, -0.13777834177017212, -0.1320817768573761, -0.12989398837089539, -0.05005311220884323, -0.8597041964530945, -0.12295117229223251, 0.4016658067703247, -0.06512872129678726, -0.04560265317...
I have a hashmap of objects. Each object has two attributes (let say int length and int weight). I want to remove k elements with the smallest length. What is the efficient way of doing this? ``` Map<K, V> map = new HashMap<>(); ... Set<K> keys = map.keySet(); TreeSet<K> smallest = new TreeSet<>(new Comparator<K>(){ ...
[ -0.37074872851371765, -0.05910887569189072, 0.5338383913040161, -0.17298611998558044, -0.1435820460319519, 0.22896462678909302, 0.12361802905797958, -0.6664751768112183, 0.012601792812347412, -0.7579520344734192, -0.015739884227514267, 0.38818061351776123, -0.2646537125110626, 0.2157267034...
elements you wish to remove. If you are doing this frequently, it might be a good idea to use a [`TreeMap`](http://docs.oracle.com/javase/7/docs/api/java/util/TreeMap.html) in the first place.
[ -0.04246487095952034, -0.04736872762441635, -0.11820371448993683, -0.035054776817560196, 0.11809935420751572, -0.2597813308238983, 0.16646458208560944, -0.20578844845294952, -0.5314030647277832, -0.10848213732242584, -0.2666020095348358, 0.34003138542175293, -0.3354123830795288, -0.1023131...
I have found myself repeatedly writing the following function : ``` // This function will try to find the 'item' in 'array'. // If successful, it will return 'true' and set the 'index' appropriately. // Otherwise it will return false. bool CanFindItem(data_type item, const data_type* array, int array_size, int& index)...
[ 0.21797528862953186, 0.09843744337558746, 0.4569952189922333, -0.3465498089790344, 0.06092047691345215, 0.029516302049160004, 0.5352324843406677, -0.4388480484485626, -0.06828267127275467, -0.46510186791419983, -0.14251895248889923, 0.5119336843490601, -0.1815938800573349, 0.24917867779731...
else index++; } return found; } ``` Usually I write a similar function for each class/struct etc. need it. My question is, is there a way to have this snippet ready to use without rewriting it ? I am programming in VS 2010. You can turn it into a template by moving it to the .h file and putting...
[ 0.4673845171928406, -0.006176312454044819, 0.5113548040390015, 0.10042143613100052, 0.06086932495236397, -0.22693195939064026, -0.12307798862457275, -0.03476659953594208, -0.12426752597093582, -0.6945011019706726, -0.10585030913352966, 0.3364836871623993, -0.2702840566635132, 0.24058836698...
I am a newbie with webdriver and need some help.. I am using Selenium 2.2.0 with FF v7.0.1 on Windows XP I've managed to record and play back a java script successfully in IE but whenever I try and execute the same script in FF, I get the following error message: Unable to connect to host 127.0.0.1 on port 7055 afte...
[ 0.44454067945480347, 0.45924893021583557, 0.43896472454071045, -0.21148788928985596, -0.1817808300256729, -0.3403058350086212, 0.6640259027481079, -0.039315365254879, -0.11303939670324326, -0.9490638375282288, 0.004241044167429209, 0.8607689142227173, -0.39300164580345154, 0.26995411515235...
org.junit.Assert.*; import org.openqa.selenium.*; import org.openqa.selenium.firefox.FirefoxDriver; public class WebdriverTest_1 { private WebDriver driver; private String baseUrl; private StringBuffer verificationErrors = new StringBuffer(); @Before public void setUp() throws Exception { driver = new FirefoxDrive...
[ 0.2712555229663849, 0.14724424481391907, 0.49028873443603516, -0.27925869822502136, 0.08833076059818268, 0.3080553710460663, 0.4182831048965454, -0.30451810359954834, 0.10854747146368027, -0.60356205701828, -0.4090235233306885, 0.694885790348053, -0.5466533899307251, 0.16294792294502258, ...
if (!"".equals(verificationErrorString)) { fail(verificationErrorString); } } private boolean isElementPresent(By by) { try { driver.findElement(by); return true; } catch (NoSuchElementException e) { return false; } } ``` } The selenium version you are using is extreme...
[ 0.07932179421186447, -0.11758451163768768, 0.6704154014587402, -0.2837682366371155, 0.25613242387771606, -0.1943843513727188, 0.3246638774871826, -0.12182541936635971, 0.09362133592367172, -0.5835122466087341, -0.22065167129039764, 0.5997800230979919, -0.4193592965602875, 0.131785169243812...
were supported starting from v2.19.0 that means you would need 2.19 or higher to support firefox 10.
[ 0.2535727322101593, -0.02419109456241131, 0.7539516091346741, -0.0995025634765625, 0.26914817094802856, -0.5214108824729919, 0.23046739399433136, -0.07828211784362793, -0.0065439362078905106, -0.6009662747383118, -0.47323077917099, 0.7664583325386047, -0.5301334261894226, -0.22224813699722...
I'm wanting to create a simple program in C# which sends the SPACE key to an inactive window or process (Wow.exe). However, I have no knowledge of C# what so ever so if you want to try help me please do but if you can't be bothered explaining to a noob that's fine ;) So basically the little program will be for the gam...
[ 0.19516904652118683, -0.1284075677394867, 0.21066871285438538, 0.43960806727409363, -0.13574309647083282, 0.019392067566514015, 0.1352844387292862, 0.061176102608442307, -0.2658241093158722, -0.5817866325378418, 0.046128883957862854, 0.5671562552452087, 0.08211708068847656, -0.022183306515...
will start sending the SPACE key once you click the button and will stop when the program is closed. But, I want it to send the key to the game even if it isn't the current active window. So I can be watching a film on Netflix and have it doing it in the background. What would I put inside this when the button is clic...
[ 0.26093313097953796, -0.08671875298023224, 0.6699596047401428, 0.0677107721567154, 0.11741539090871811, -0.18792887032032013, -0.0173904150724411, -0.16872040927410126, -0.28588205575942993, -0.7192596197128296, -0.4144270122051239, 0.5616370439529419, -0.2829133868217468, 0.14323861896991...
then [P/Invoke](http://pinvoke.net/default.aspx/user32.SendMessage) the [SendMessage](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950%28v=vs.85%29.aspx) function with [WM\_KEYDOWN](http://msdn.microsoft.com/en-us/library/windows/desktop/ms646280%28v=vs.85%29.aspx) and the [virtual key code for space ba...
[ -0.1470271348953247, -0.025966385379433632, 1.0098598003387451, -0.1536603569984436, 0.04985058307647705, 0.2968611419200897, -0.157446026802063, -0.2756003141403198, -0.3939155042171478, -0.49720171093940735, -0.7516770362854004, 0.31135836243629456, -0.13849763572216034, 0.37559086084365...
An expression consisting of operands and binary operators can be written in Reverse Polish Notation (RPN) by writing both the operands followed by the operator. For example, 3 + (4 \* 5) can be written as "3 4 5 \* +". You are given a string consisting of x's and \*'s. x represents an operand and \* represents a binar...
[ -0.10746657103300095, -0.019123774021863937, 0.2922441065311432, -0.26295995712280273, -0.0788782462477684, 0.37126511335372925, 0.1606563925743103, -0.5570009350776672, 0.027493230998516083, -0.15662074089050293, -0.48762834072113037, 0.3371392488479614, -0.29754388332366943, -0.037236098...
replace operations needed to convert the given string into a valid RPN expression? Input: The first line contains the number of test cases T. T test cases follow. Each case contains a string consisting only of characters x and \*. Output: Output T lines, one for each test case containing the least number of operation...
[ 0.04403262585401535, -0.02927895076572895, 0.2877815365791321, -0.07853613048791885, 0.12644323706626892, 0.579781174659729, 0.17677031457424164, -0.5870440006256104, 0.21553991734981537, -0.3897952139377594, -0.40558311343193054, 0.6382411122322083, -0.4655395448207855, -0.361461669206619...
insert operation: xx -> xx -> xx This is one unusually big answer. I wouldn't be surprised if there exist also an elegant two-liner, but until that one is posted here's mine. Imagine that you have a simple graph 2D, where x-axis denotes the parsing step, and y-axis denotes the difference between the current number of ...
[ 0.04200429469347, 0.3053090274333954, 0.35324540734291077, -0.02387169748544693, -0.21493449807167053, 0.2924937307834625, -0.08541136234998703, -0.1763814389705658, -0.13679908215999603, -0.6149167418479919, -0.12978334724903107, 0.5285894870758057, -0.4586518406867981, -0.041731324046850...
* x x * * ``` In order for expression to be valid this graph must never reach zero or below on y-axis, and at the end the value of y must be one (single value left on stack). You are given three operations to be used on input expression: insert, delete, and replace. This replace operation is actually one of the two:...
[ -0.10483556985855103, 0.06887534260749817, 0.6336408257484436, -0.10843545198440552, 0.08459506928920746, 0.0956994891166687, 0.2271585315465927, -0.2366776466369629, -0.06865298002958298, -0.5945896506309509, -0.36641356348991394, 0.45982596278190613, -0.5796462297439575, 0.10349462926387...
down. When replace is applied the points are moved up or down for two notches in the graph. One interesting note: we don't have to deal with delete operations, because the result is the same as applying the opposite insert, with the difference that inserts can be applied always and deletes only if there is a symbol ava...
[ -0.10538537800312042, -0.1749979853630066, 0.4544941186904907, 0.10391727834939957, 0.04090382531285286, 0.32395392656326294, 0.19296614825725555, -0.40507420897483826, -0.40768367052078247, -0.515466034412384, -0.053970448672771454, 0.5512636303901672, -0.35934609174728394, -0.16697852313...
additional insert operation. If total of N(x)-N(\*) is N then number of operations would be floor((N-1)/2). The sign determines which operations are to be applied. The problem is we must pay attention to the other condition, which is that graph must never reach zero. To determine this we must first apply previous oper...
[ -0.1512511819601059, 0.09392053633928299, 0.45432960987091064, -0.1399683952331543, 0.08315213024616241, 0.3430696427822113, 0.11720485240221024, -0.35285285115242004, -0.5268216133117676, -0.5708719491958618, -0.15873412787914276, 0.5956575870513916, -0.449921190738678, 0.0109279407188296...
beginning and look for place where y=0. If there is such a place then you must insert one x before it, and compensate with inserting one \* at the expression end. But remember that you already may have had done that (insert x at start, or insert \* at end). If you have two inserts x then pretend it was actually replace...
[ 0.0281672403216362, 0.1194894015789032, 0.08096827566623688, -0.2034275233745575, 0.10145305842161179, 0.07166782766580582, 0.21607081592082977, -0.033310048282146454, -0.009514636360108852, -0.673427402973175, -0.40190181136131287, 0.7235801815986633, -0.20943549275398254, -0.183660358190...
change the expression, because if x that you find when search from end is actually before your current position then you can't apply replace, and so can't compact two insert operations into one replace. Continue iteration until end, count for additional operations, and all the time keep in mind if you have one insert ...
[ 0.18420852720737457, -0.22594863176345825, 0.43997523188591003, -0.2570726275444031, 0.2639113664627075, 0.16726785898208618, 0.13709990680217743, -0.31431370973587036, -0.19935424625873566, -0.5924438238143921, -0.06692899763584137, 0.757440984249115, -0.29622095823287964, -0.053983435034...
Is it ok to have only one model that can hold many different types of subscriptions? For example, lets say you can subscribe to comments, users, forum threads and news articles inside of an application. They all have different types of columns though. This how it would look with the associations setup. ``` Users att...
[ 0.29556331038475037, 0.08359986543655396, 0.5308482050895691, 0.23549972474575043, -0.12615935504436493, -0.10083599388599396, -0.06897155940532684, 0.07885926216840744, -0.5731552243232727, -0.6203122138977051, 0.21905045211315155, 0.5213412642478943, -0.12701301276683807, 0.2203330695629...
:class_name => 'User' Subscription :content, :rating, :number, :name, :role, :title, :type, :main_category, :news_title, :importance, :user_id, :comment_id, :thread_id, :article_id belongs_to :user, :comment, :thread, :article ``` Basically with one subscription model a user can choose to subscribe to a commen...
[ 0.5659521818161011, -0.029699547216296196, 0.41978421807289124, 0.37460508942604065, -0.4605225920677185, -0.14542563259601593, -0.05761636793613434, -0.049241408705711365, -0.31045255064964294, -0.5022196769714355, 0.0435824990272522, 0.38083264231681824, -0.43950173258781433, 0.448179066...
:subscribable, :polymorphic => true User has_many :subscriptions Comment has_many :subscriptions, :as => :subscribable Article has_many :subscriptions, :as => :subscribable ``` and then create new subscription like this ``` user.subscriptions.create(:subscribable => article) ``` and use it like this (if y...
[ 0.41485533118247986, 0.15610909461975098, 0.706996738910675, 0.23404361307621002, -0.1289437711238861, -0.25396624207496643, 0.0637449249625206, -0.20005741715431213, -0.2309313714504242, -0.6458494663238525, -0.17226965725421906, 0.5779579877853394, -0.28880926966667175, 0.179720625281333...
When parsing a YYYYMMdd date, e.g. 20120405 for 5th April 2012, what is the fastest method? ``` int year = Integer.parseInt(dateString.substring(0, 4)); int month = Integer.parseInt(dateString.substring(4, 6)); int day = Integer.parseInt(dateString.substring(6)); ``` vs. ``` int date = Integer.parseInt(dateString) ...
[ -0.31700995564460754, 0.07896264642477036, 0.6591394543647766, -0.06125462427735329, -0.18688324093818665, 0.32212939858436584, 0.3347061276435852, -0.3154728412628174, -0.3349692225456238, -0.6230526566505432, -0.1846318393945694, 0.1813582181930542, 0.04259435832500458, 0.325200110673904...
the date processing only is relevant when you look at *millions* of iterations. Instead, you should choose a solution that is easy to read and maintain. Although you could use `SimpleDateFormat`, it is not reentrant so should be avoided. The best solution is to use the great Joda time classes: ``` private static fina...
[ -0.047402337193489075, -0.022651785984635353, 0.5906053185462952, -0.17075328528881073, 0.12606531381607056, 0.15896010398864746, 0.028261225670576096, -0.22985629737377167, -0.2784166634082794, -0.4680439233779907, 0.057738956063985825, 0.5933595299720764, -0.3248066008090973, 0.167515069...
that process the string once will be the fastest. A quick test run shows that: ``` year = Integer.parseInt(dateString.substring(0, 4)); month = Integer.parseInt(dateString.substring(4, 6)); day = Integer.parseInt(dateString.substring(6)); ``` Takes ~800ms while: ``` int date = Integer.parseInt(dateString); year = d...
[ -0.15893100202083588, -0.0037020801100879908, 0.5724099278450012, -0.08220226317644119, 0.047951653599739075, 0.33620283007621765, 0.26312151551246643, -0.20640939474105835, -0.19196006655693054, -0.6632391810417175, -0.21560639142990112, 0.27655327320098877, 0.12869790196418762, 0.3315357...
I'm working in a c# windows application with vs2010 and a local database.In one of my forms i use a ReporViewer to display a report. I would like to be able to show results from a record in this report only if a specific field (witch is a date) is not null. I created a table and i added a filter but seems that the exp...
[ 0.519045352935791, -0.035268377512693405, 0.41825729608535767, 0.032048892229795456, -0.15911617875099182, -0.3185877501964569, 0.4447965919971466, -0.22026894986629486, -0.14188852906227112, -0.4621219336986542, 0.3170378506183624, 0.33074042201042175, -0.0038160451222211123, 0.3231587111...
payed is a date field
[ 0.47194722294807434, -0.16755488514900208, 0.3196350932121277, 0.0635652244091034, 0.10727322101593018, -0.14245814085006714, -0.6387973427772522, 0.17768576741218567, -0.11883724480867386, 0.008375999517738819, -0.25672298669815063, -0.12809763848781586, -0.017596431076526642, 0.047548055...
I would like to create a JTree from a two dimensional object array that I will import from a SQL query. This is what the SQL table looks like: Here is sample of the object: ``` Object[][] table = { {1, 0, "Root"}, //i=0 {2, 1, "Node2"}, //i=1 {3, 1, "Node3"}, //i=2 {4, 1, "Node4"},...
[ -0.03853072226047516, 0.07014331221580505, 0.1778174489736557, -0.17380525171756744, -0.015657557174563408, 0.11352302879095078, 0.1394108384847641, -0.15313772857189178, -0.018505141139030457, -0.582316517829895, 0.01585708186030388, 0.18114855885505676, -0.3152391016483307, 0.01050098892...
{6, 4, "Node6"}, //i=5 {7, 4, "Node7"}, //i=6 {8, 1, "Node8"}, //i=7 {9, 1, "Node9"}, //i=8 {10, 9, "Node10"},}; //i=9 ``` Here is the logic i use to sort the array: ``` for (int i = 0; i < table.length; i++) { for (int j = i; j < table.length; j++) {
[ -0.4031926989555359, 0.06843668967485428, 0.4072694480419159, -0.26145103573799133, -0.03347976505756378, 0.4337007701396942, 0.25644099712371826, -0.5520420670509338, -0.1410066783428192, -0.31775590777397156, -0.10068389028310776, 0.14512184262275696, -0.020730087533593178, 0.00792370643...
if (table[i][0] == table[j][1]) { System.out.println(table[i][2].toString() + " is parent of " + table[j][2].toString()); } } } ``` This is what the above displays in the console: ``` Root is parent of Node2 Root is parent of Node3 Root is parent of Node4 Root is parent o...
[ -0.817823052406311, -0.17427994310855865, 0.4799187183380127, -0.13809996843338013, 0.3146401047706604, 0.005291187670081854, 0.17267681658267975, 0.01579664647579193, -0.21986305713653564, -0.5801485180854797, -0.3479454815387726, 0.017400968819856644, -0.05987881124019623, 0.444516867399...
parent of Node7 Node9 is parent of Node10 ``` I'm struggling with creating the TreeModel, HashTable, Object, etc. that I can use to create the JTree. I've been stuck on this problem for over a week and I could really use another person's experience right now. expression `=IsNothing(Fields!payed.Value)` operator `=...
[ -0.3252262771129608, -0.39982715249061584, 0.5357072949409485, -0.11757900565862656, 0.2422545999288559, -0.13810013234615326, 0.02055378071963787, 0.3238399028778076, -0.25152388215065, -0.36680302023887634, -0.03249168395996094, -0.10223498195409775, -0.30837804079055786, 0.2830569744110...
I am building a user interface using Raphael JS. currently I have a `.js` script that draws out everything using Raphael JS 2.1 exactly as needed. However, because the drawing is driven by dynamic data it is highly likely that objects will overlap. Adding the d3.js Force Layout to the objects would cause them to scatte...
[ 0.09109848737716675, 0.1737758070230484, 0.4038581848144531, -0.3072572648525238, -0.516913652420044, 0.029990078881382942, 0.16381454467773438, -0.3042200803756714, -0.08159061521291733, -0.9234983921051025, 0.1403646022081375, 0.5582569241523743, -0.3637635111808777, -0.04347431659698486...
fixed up your example and posted the result at <http://jsfiddle.net/gn6tZ/6/>. You had a minor typo in your collide function (`- y` instead of `- r`) and when you want to update the nodes after the force layout runs you need to supply the update function with the new data. ``` var nodes = circleHolder.nodes(); force....
[ 0.045165758579969406, -0.37198373675346375, 0.7864103317260742, 0.035264067351818085, -0.050754424184560776, 0.19710680842399597, 0.19326509535312653, -0.2256128340959549, -0.4932178854942322, -0.6662585735321045, 0.12093430012464523, 0.4550706148147583, -0.46177807450294495, 0.18777160346...
.attr("cx", function(d) { return d.x; }) .attr("cy", function(d) { return d.y; }); }); ```
[ -0.0005088723264634609, 0.21413631737232208, 0.37185540795326233, -0.15121638774871826, -0.0748085156083107, 0.19908136129379272, 0.13613347709178925, -0.16522742807865143, 0.1663045883178711, -0.3416593074798584, -0.6739250421524048, 0.9876444339752197, -0.5604831576347351, 0.371155947446...
Yes, I know. Why would you want to migrate from Git to SVN? Well I happen to be in a situation that I need to migrate a huge Git repo to Subversion! Here's one workflow I tried per Edwin's comment: first create a local SVN repo: `svnadmin create svn_repo` Next I check out my Git repo: `git clone git:myNameSpace/m...
[ 0.47211000323295593, -0.009611513465642929, 0.5573383569717407, 0.11617634445428848, 0.02746172808110714, 0.039482876658439636, -0.011803863570094109, -0.18241119384765625, -0.20991019904613495, -0.7462157607078552, 0.13642603158950806, 0.4525340497493744, -0.4205397665500641, 0.4218956232...
empty trunk commit: `git rev-parse svn/trunk` This one unfortunately fails with: `fatal: ambiguous argument 'svn/trunk': unknown revision or path not in the working tree. Use '--' to separate paths from revisions` Well I can't go much after this.... I would recommend you to migrate that with SubGit in several easy s...
[ -0.16899415850639343, 0.0983523428440094, 0.5286862850189209, 0.22649861872196198, 0.08805350959300995, 0.07301711291074753, 0.5153315663337708, 0.2650575041770935, -0.357433021068573, -0.7305973768234253, -0.2819443643093109, 0.5280117988586426, -0.1792878359556198, 0.3258223235607147, ...
it possible. After translation the repositories will be in sync (each push to Git is translated to SVN revision and vice versa). To break synchronization (if you don't need it) run ``` $ subgit uninstall svn.repo ```
[ -0.13615456223487854, -0.24148593842983246, 0.7813851833343506, 0.11678244173526764, 0.22517864406108856, -0.1901722252368927, 0.3525974750518799, 0.13742581009864807, -0.2726185619831085, -0.7471339106559753, -0.5265506505966187, 0.4842594861984253, -0.2023642212152481, 0.1446922570466995...
I have some input HTML elements which I want to validate whether they are filled up or not. Basically, they are mandatory. I am doing something like this: ``` var displayNames new Array(); displayNames[0] = "Name"; displayNames[1] = "Address"; displayNames[2] = "Age"; function validForm() { var Na...
[ 0.38482189178466797, 0.17408740520477295, 0.6756657958030701, -0.4017975628376007, -0.05326336994767189, -0.20168086886405945, 0.3091190457344055, -0.5097405314445496, -0.2430313676595688, -0.4726896286010742, -0.34782588481903076, 0.5756317377090454, -0.11612541228532791, -0.0115925362333...
strings? Or can some be numbers? Or some in need of a regex (like an email address)? Heck, can some even be an empty string or blank? If we are talking about less than 12 fields, then I would consider rolling my own validation. However, if we are talking a lot of fields spread across multiple pages and projects then I...
[ 0.5899617671966553, -0.19304676353931427, 0.07062589377164841, 0.18223942816257477, -0.32215967774391174, 0.008034748025238514, 0.00314336852170527, -0.23127451539039612, -0.5804606080055237, 0.10744283348321915, 0.13001392781734467, 0.2657996416091919, -0.14526432752609253, -0.07552456110...
I am using the following tutorial example verbatim: <http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx> The error message is that the connection failed. "Modify it to connect to a Norhtwinf=d database accessible to your system." ``` string connectionString = "Integrate...
[ 0.0033533209934830666, 0.2534599304199219, 0.5519353747367859, -0.0008950073970481753, 0.23392342031002045, -0.23305873572826385, 0.5804869532585144, -0.1259685754776001, -0.47813329100608826, -0.7327024936676025, -0.0009788289899006486, 0.25306808948516846, -0.36873459815979004, 0.2293528...
ROWS * COLUMNS` bytes. As you allocated it in a for-cycle, you must also output it in a for-cycle. ``` for (i = 0; i < outer_dim; i++) for (j = 0; j < ROWS; j++) fwrite(three_dim[i][j], COLUMNS, 1, temp); ```
[ -0.08064009994268417, -0.04753047227859497, 0.5980489253997803, -0.47635701298713684, -0.006504969205707312, 0.35311758518218994, 0.2640005648136139, -0.5314972400665283, -0.26202863454818726, -0.3980768918991089, -0.11569216847419739, 0.4086081385612488, -0.4967714548110962, -0.1635744422...
How to get highlighting from interactive regex search in emac to remain highlight until deactivated? For instance, with the text provided and running M-C-s (Regexp I-Search) with input 'file' will highlight the 3 'file' words in the text below. ``` ;; This buffer is for notes you don't want to save, and for Lisp evalu...
[ -0.30819377303123474, 0.04517781361937523, 0.31243497133255005, -0.22570408880710602, -0.31130605936050415, 0.11531589925289154, 0.25841760635375977, 0.13307008147239685, -0.12647482752799988, -0.7693973779678345, -0.11762712150812149, 0.2786540985107422, -0.272485613822937, -0.15453037619...
I run another command to turn it off. How could I do this? You're looking for `highlight-regexp` bound to `M-s h r`. `M-s h u` unhighlights. [highlight-symbol](http://nschum.de/src/emacs/highlight-symbol/) provides a nice wrapper around this.
[ 0.24345500767230988, 0.06169326975941658, 0.39905574917793274, 0.03911369666457176, -0.06041746586561203, -0.12667687237262726, 0.5529053211212158, 0.2621670365333557, -0.35027405619621277, -0.580265998840332, -0.06927494704723358, 0.20468461513519287, -0.08830318599939346, 0.3058633506298...
I would like to use a timer instead of sleep within a windows service that should perform an action at a constant interval. Lets say that I have the following class. ``` class MailManagerClient { //fields string someString //Constructor public MailManagerClient() { aTimer = new System...
[ 0.2606929540634155, -0.1392177939414978, 0.5220943093299866, -0.15141090750694275, 0.3477170169353485, 0.18069104850292206, 0.3690292537212372, -0.4833686053752899, -0.26036709547042847, -0.738939642906189, 0.04729276895523071, 0.6180739402770996, -0.19181735813617706, 0.043216098099946976...
public bool DoSomthingIncConstantInterval() { //Do Somthing return true; } private static void OnTimedEvent(object source, ElapsedEventArgs e) { DoSomthingIncConstantInterval() } } ``` And I also have a windows service with the `OnStart` method. I understand that in the `O...
[ 0.09716302901506424, 0.03460128605365753, 0.4987165629863739, -0.1636638641357422, 0.3545818030834198, -0.06930749118328094, 0.4487062394618988, -0.06053416058421135, 0.00514477863907814, -0.5333147644996643, -0.07949351519346237, 0.7286534309387207, -0.22384396195411682, 0.435079216957092...
new thread? How should the thread stay alive? In situations like this I like to actually keep the `<a>` the `ActionLink` generates, and just add JavaScript to enhance the behavior of the link. So your view wouldn't really change (I did add a class so that we can bind an event handler to it later): ``` @Html.ActionLin...
[ 0.258012056350708, -0.3621269464492798, 0.4833212196826935, 0.08026600629091263, -0.049272067844867706, -0.17681726813316345, 0.1994243860244751, -0.0874016061425209, -0.5251639485359192, -0.6838721632957458, 0.19572731852531433, 0.5060872435569763, -0.3606274425983429, 0.19443108141422272...
$(document).ready(function () { $("a.item-link").click(function (event) { event.preventDefault(); // Stop the browser from redirecting as it normally would $.get(this.href, function (response) { // Do whatever you want with the data. }); }); }); </...
[ 0.1393367499113083, -0.22487467527389526, 0.6754910349845886, -0.15637356042861938, 0.31712910532951355, -0.20202894508838654, 0.34484073519706726, -0.28973865509033203, -0.19378183782100677, -0.5083367228507996, -0.6501514911651611, 0.6410019993782043, -0.2639862298965454, 0.0897531285881...
action method in the controller should return an `ActionResult`. It's hard for me to say what type of `ActionResult` you should return without actually knowing what type of data you want to consume on the client, but if you wanted to inject HTML onto the page, you could write something like this: ``` public ActionResu...
[ -0.1949617713689804, -0.689886748790741, 0.44416505098342896, 0.041639313101768494, -0.1633543223142624, 0.0737353041768074, 0.1996510624885559, -0.5198983550071716, -0.3956325054168701, -0.5642792582511902, -0.11536185443401337, 0.6715808510780334, -0.45350101590156555, -0.129482015967369...
function (response) { $("element_to_populate").html(response); }); }); ``` Where `element_to_populate` would be a selector that points to where you want to inject the HTML.
[ -0.21771647036075592, -0.42841702699661255, 0.686859667301178, -0.25588199496269226, 0.09248237311840057, 0.047484107315540314, 0.07001825422048569, -0.2796683609485626, -0.0574059784412384, -0.46740850806236267, -0.5525747537612915, 0.35424038767814636, -0.6055718064308167, -0.11471950262...
How would I change this JS function to only check the checkboxes with a value in a comma separated string? With MySQL I can do this using the "IN" function, is there a function like that in Javascript? Cannot seem to find.. I want to select a "Group" Checkbox with a value of 1,2,3,4,5...... and when checked, check the...
[ 0.013520175591111183, -0.10441600531339645, 0.004768533632159233, -0.15910016000270844, -0.23367372155189514, 0.1263369470834732, 0.26912209391593933, -0.5455418825149536, -0.1343630999326706, -0.6693204045295715, -0.11155498027801514, 0.12652818858623505, -0.5836875438690186, -0.159290254...
{ if (!document.forms[FormName]) return; var objCheckBoxes = document.forms[FormName].elements[FieldName]; if (!objCheckBoxes) return; var countCheckBoxes = objCheckBoxes.length; if (!countCheckBoxes) { objCheckBoxes.checked = CheckValue; } else { // set the check value f...
[ -0.17628704011440277, -0.07139323651790619, 0.5337429046630859, -0.34283679723739624, 0.2519457936286926, 0.2740184962749481, 0.5345173478126526, -0.6106341481208801, -0.01970459707081318, -0.6231586933135986, -0.4573163688182831, 0.4382619857788086, -0.48775485157966614, -0.04691024124622...
} } } ``` I can't speak for the 2nd or 3rd, but if you install Node first, Sublime-HTMLPrettify works pretty well. You have to setup your own key shortcut once it is installed. One thing I noticed on Windows, you may need to edit your path for Node in the %PATH% variable if it is already long (I think the limit is...
[ 0.05989328399300575, 0.0744972750544548, 0.2681070566177368, -0.2312554270029068, -0.10139311105012894, -0.349213182926178, 0.39024823904037476, 0.12727855145931244, -0.1361321061849594, -0.978158175945282, 0.07389327138662338, 0.4877415895462036, -0.516931414604187, -0.0063886456191539764...
the HTMLPrettify.py file - <https://github.com/victorporof/Sublime-HTMLPrettify/issues/12>
[ 0.08955167979001999, 0.28375887870788574, 0.41804230213165283, 0.16732673346996307, -0.12124499678611755, -0.2702435851097107, 0.011531484313309193, -0.0839337483048439, -0.4337958097457886, -0.002579253166913986, -0.17591676115989685, 0.29107627272605896, -0.04470954090356827, 0.100970678...
It turns out this does exactly what I want it to do. But HTML does not replace the function call with a value, which is why I got confused. The correct value IS passed into the array though. I am leaving this question here in case others have the same issue. I have some javascript: ``` <script type="text/javascript">...
[ 0.1235307902097702, -0.21478860080242157, 0.5438620448112488, -0.30641430616378784, -0.19862104952335358, -0.21703305840492249, 0.49313998222351074, -0.4682523310184479, -0.14315089583396912, -0.7331607937812805, -0.2154844105243683, 0.3181198537349701, -0.3835048973560333, -0.260498255491...
return 'Some Value'; } var $SAT = $SAT || []; $SAT.push(['setContent','subtype',getValue()]); $SAT.push(['setUser', '1234']); </script> ``` however the resulting code does not replace the getValue() function call with 'Some Value' as I would have expected. Does anybody know why, and what I need to do ...
[ -0.11372926086187363, -0.219581738114357, 0.6020505428314209, -0.45952534675598145, 0.06331381946802139, -0.1700034737586975, 0.4642133116722107, -0.37866318225860596, 0.013828360475599766, -0.4054126739501953, -0.5861840844154358, 0.4007204473018646, -0.37926095724105835, 0.01436060387641...
``` Microsoft.Win32.RegistryKey registryPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Wow6432Node\Testing"); Microsoft.Win32.RegistryKey entryKey = registryPath.OpenSubKey("Entry Point"); ``` I have a lot of keys in Testing, in the format: "Entry Point 011", "Entry Point 123" - so Entry Point wi...
[ 0.09583146870136261, 0.3509954512119293, 0.20856575667858124, 0.09455205500125885, 0.13933636248111725, -0.18616774678230286, 0.14016345143318176, -0.1880982369184494, -0.017779922112822533, -0.795311450958252, 0.022738706320524216, 0.469368040561676, -0.2028265744447708, 0.083930499851703...
are keys as high as "Entry Point 9000" having a for loop execute 9000 times is very inefficient. ``` for (int i = 0; i <= highestEntryPointValue; i++) { Microsoft.Win32.RegistryKey entryKey = steamApps64.OpenSubKey("Entry Point " + Convert.ToString(i)); if (entryKey != null) { count++; ...
[ 0.007922878488898277, -0.14579738676548004, 0.3299901783466339, 0.011132726445794106, 0.1676868200302124, -0.040167078375816345, 0.5230299830436707, -0.4305340647697449, -0.10174808651208878, -0.528397798538208, -0.06088181212544441, 0.338582843542099, -0.38058915734291077, 0.3100993335247...
subKeys = Array.FindAll(keys, key => key.Substring(0, 11) == "Entry Point")); int count = subKeys.Lenght; foreach(string s in subKeys) ..... ```
[ -0.3472127616405487, -0.1561412215232849, 0.25092771649360657, -0.43254122138023376, 0.20220108330249786, 0.10571686923503876, 0.3504689931869507, -0.36743730306625366, -0.1416143774986267, -0.3567630648612976, -0.5472331047058105, 0.33920928835868835, -0.386812686920166, 0.197376936674118...
I have a list called DiscountableObject. Each item on the list in turn has a Discounts collection. What I need is a list of Discounts which are common across all DiscoubtableObjects. Code: ``` List<Discount> IntersectionOfDiscounts = new List<Discount>(); foreach(var discountableItem in DiscoutableObject) { Int...
[ -0.016070663928985596, 0.07493546605110168, 0.40324416756629944, -0.19178198277950287, 0.022745400667190552, 0.09679694473743439, -0.1430479884147644, -0.1344137042760849, -0.2903599441051483, -0.8416314125061035, 0.13469760119915009, 0.6478177905082703, -0.39327436685562134, 0.31737071275...
doing the intersection and the addition to the list at the same time...but how else baffles me? How do I get around this? Initialize `IntersectionOfDiscounts` to the first Discount List (if there is more than one) rather than to an empty list. You can also then skip the first item in the 'foreach' loop. ``` // add ch...
[ 0.11723322421312332, 0.006783315446227789, 0.5031465291976929, -0.10847346484661102, 0.14390486478805542, 0.12042849510908127, -0.0317249670624733, -0.33258533477783203, -0.43229207396507263, -0.7626246809959412, -0.15777979791164398, 0.637036144733429, -0.5395233631134033, -0.040037412196...
I am defining this function in one of my classes: ``` public function onUse():void {}; ``` Then in another of my classes (let's call it "class2"), I create a object of this class, and then want to override this function with another one. After some Google-Fu, I have found this, and used it... ``` button.onUse { ...
[ -0.16931132972240448, 0.0041267224587500095, 0.30180588364601135, -0.22130365669727325, 0.1732150912284851, -0.17297790944576263, 0.27876341342926025, 0.03725369647145271, -0.06538891792297363, -0.5710546374320984, -0.13487589359283447, 0.5472239255905151, -0.5451839566230774, 0.3521601259...
always throws errors. Can anyone tell me whether what I am trying to do is actually possible, and if it is, how can I do it? You can only override functions when you are extending the class: ``` public class A { public function foo():void { doStuff(); } } public class B extends A { override publi...
[ 0.24872726202011108, 0.10838551074266434, 0.3904542028903961, -0.33779680728912354, 0.2421562522649765, -0.12897558510303497, 0.6051987409591675, -0.6748796701431274, -0.020807063207030296, -0.35755082964897156, -0.13320590555667877, 0.7608838081359863, -0.4843314290046692, 0.2627498209476...
a different function to a class method of an instance is not possible at runtime. You can, however, let your original class contain a *field of type `Function`*, and then simply assign a different closure to it. ``` public class A { public var foo:Function; } var n:A = new A(); n.foo = function ():void { do...
[ 0.003401928348466754, -0.10201477259397507, 0.48841553926467896, -0.29010581970214844, -0.003573361551389098, 0.05834056809544563, 0.5078453421592712, -0.48053786158561707, -0.09171334654092789, -0.4645669758319855, -0.3654056489467621, 0.6698729395866394, -0.6164458394050598, 0.4044276177...
I have a payPal url and it has `&currency_code=CAD` in the url when it is displayed on the site says `¤cy_code=CAD` why is it doing this and how do I fix it? Just a thought, `&curren;` is the HTML code for `¤`. If you are displaying the URL than contains that code on the webpage itself, then it will show up as `¤`. You...
[ 0.9798647165298462, 0.1446901112794876, 0.6882696747779846, 0.07092902809381485, 0.054470572620630264, 0.030279142782092094, -0.3599274754524231, 0.21987977623939514, 0.022114789113402367, -0.5916333794593811, 0.0402853786945343, 0.7266034483909607, -0.014854990877211094, 0.146715044975280...
I'm trying to write a script that grabs the URL of the first image from this website: <http://www.slothradio.com/covers/?adv=&artist=pantera&album=vulgar+display+of+power> Here's my script: ``` $content = file_get_contents($url); $doc = new DOMDocument(); $doc->loadHTML($content); $xpath = new DOMXpath($doc); $eleme...
[ 0.30356916785240173, -0.010233872570097446, 0.7366352677345276, -0.15650995075702667, 0.03387417644262314, -0.025208473205566406, 0.151783287525177, -0.21253664791584015, -0.22366644442081451, -0.5642050504684448, -0.2857186198234558, 0.7886146903038025, -0.3018973767757416, 0.150956064462...
I have loaded an array (recordArray) in RootViewController class which I need to pass to the DetailViewController class so that I can access any variable within it. I can pass a single value successfully, but I cannot get how to pass the whole array across. I have created a second NSMutableArray recordArray in Detail...
[ 0.3483147621154785, 0.14899097383022308, 0.5592631697654724, -0.2044134885072708, 0.10352823138237, 0.06640790402889252, 0.35850852727890015, -0.5460516214370728, -0.13268275558948517, -0.526451587677002, 0.17416095733642578, 0.7098294496536255, 0.03536262735724449, 0.12150800973176956, ...
found anything which I understand sufficiently to be able to implement. I expect I'm going about this all wrong.... Thanks in advance for your help guys. Please refer to this code: [iPhone SDK: How do I pass an array of values from a ViewController onto other ViewController?](https://stackoverflow.com/questions/50768...
[ -0.055221088230609894, -0.3248674273490906, 0.10366690158843994, 0.24176736176013947, -0.056709807366132736, -0.20134291052818298, 0.3742962181568146, 0.007943020202219486, -0.16125541925430298, -0.9537125825881958, -0.36924391984939575, 0.18716852366924286, -0.37997356057167053, -0.139605...
Is there a library where I can simple call a method on a string to find out if it is non-English? I'm trying to only save English strings and the incoming stream of strings has plenty of non-English in them. You can try to use [linguo](https://github.com/NARKOZ/linguo#readme). ``` "your string".lang # will return "en"...
[ 0.6644228100776672, 0.4111068844795227, -0.2884383201599121, 0.045609306544065475, -0.10437127947807312, -0.19431346654891968, 0.34096387028694153, 0.20507797598838806, 0.008949295617640018, -0.6186673045158386, -0.13858580589294434, 0.5689690709114075, 0.22614814341068268, 0.2495075762271...
So let's say i have `T`, `T = 1200`. I also have `A`, `A` is an array that contains 1000s of entries and these are numerical entries that range from `1000-2000` but does not include an entry for `1200`. What's the fastest way of finding the nearest neighbour (closest value), let's say we ceil it, so it'll match `1201...
[ 0.1525939255952835, 0.204031303524971, 0.3889429271221161, 0.19243934750556946, -0.03857976943254471, 0.08452785015106201, -0.026569919660687447, -0.17663538455963135, 0.02266349270939827, -0.6932222247123718, 0.23189689218997955, 0.42364874482154846, 0.12811878323554993, 0.199576959013938...
the array, you don't have to sort them. For example, you'd have an array where `T` is the index, and it would have an object with an array with all the indexes of the `A` array that hold that value. you could also put the closest value's index as part of that object, so when you're retrieving this every frame, you on...
[ 0.24415485560894012, 0.04860151931643486, 0.14743126928806305, 0.3152082562446594, 0.07074573636054993, 0.1812228262424469, -0.060670990496873856, -0.2590181529521942, -0.44614776968955994, -0.5458738207817078, -0.1016497015953064, 0.5492949485778809, -0.27951452136039734, 0.04090964794158...
to look into linked lists, for certain operations they are quite a bit faster (slower on sort though)
[ 0.24338823556900024, -0.15601912140846252, 0.07683420926332474, 0.23125962913036346, -0.13741208612918854, -0.214621439576149, 0.27093079686164856, 0.13037534058094025, -0.530846118927002, -0.840893030166626, 0.19624535739421844, 0.33972907066345215, -0.03415302187204361, -0.23689542710781...
I have an array of strings such as "blue", "green", "red" and I wish to sort them so the longest string comes first and the shortest last. Currently I am creating another array with the lengths of each string in the array in the same index positions and using this array as the key array to sort by as can be seen below...
[ -0.010571695864200592, -0.19395163655281067, 0.6703870296478271, -0.39260178804397583, -0.3557242155075073, 0.32561060786247253, 0.16378086805343628, -0.5382562279701233, -0.27387022972106934, -0.4581567943096161, -0.13206897675991058, 0.40703287720680237, -0.33472391963005066, 0.308324009...
colours as a list in the example code, it's an array in my actual code. To my opinion this is the shortes way. Use linq. ``` Dim strs = New String() {"", "333", "22", "4444", "55555", "1"} Dim sorted = strs.OrderBy(Function(x) x.Length).ThenBy(Function(x) x).ToArray() ``` **Edit** If you want a reverse order just g...
[ 0.047614216804504395, -0.2686646282672882, 0.7380461096763611, -0.5342778563499451, -0.12630771100521088, 0.3680855333805084, 0.1846492737531662, -0.40107405185699463, -0.5620965361595154, -0.6317037343978882, -0.25426438450813293, 0.6268775463104248, -0.4902673363685608, 0.010128901340067...
When I try to connect to the local MySQL database I am getting different results from these three methods: 1. It works when I connect with the following from the prompt: mysql -u root -p This way prompts me for the password, and once typed I am connected. 1. It works when I connect with PHP and supply the server(lo...
[ -0.06286206096410751, -0.18005578219890594, 0.4773046374320984, 0.09279156476259232, -0.05753021687269211, 0.07029341161251068, 0.3747483789920807, 0.15908794105052948, -0.032475076615810394, -0.710520327091217, -0.14929036796092987, 0.633589506149292, -0.2599177658557892, 0.01402625255286...
I query the mysql.user table for the user root there are 3 entries: root@:: root@127.0.0.1 root@localhost There error I get when supplying the password in the same line is: > ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Anybody know whats going on? If your password contains sp...
[ 0.16094712913036346, 0.3070608973503113, 0.3329922556877136, -0.17483308911323547, -0.035640738904476166, 0.15649445354938507, 0.7480390071868896, 0.07832106202840805, -0.18107657134532928, -0.6600016951560974, -0.20496968924999237, 0.6159552335739136, -0.10437662154436111, 0.1628556400537...
or --password=your\_pass option on the command line. > > > This is convenient but insecure, because your password becomes visible to system status programs such as ps that may be invoked by other users to display command lines. The other option is to store the password in a file that only the relevent users can read...
[ -0.03987247496843338, -0.20430557429790497, 0.6237133145332336, 0.09502881020307541, 0.3507392406463623, -0.10570236295461655, 0.12455350160598755, -0.06208024546504021, -0.20344145596027374, -0.6244478225708008, -0.5305402278900146, 0.7616223692893982, -0.1679089516401291, -0.133937492966...
I have a lot of functions that I need to access in my controllers and views. Where is the best place to put these functions? Functions used for view formatting across the whole application belong in the `ApplicationHelper`, however those helper functions should not perform any controller logic of their own. In other w...
[ 0.13708306849002838, 0.12804745137691498, 0.6010965704917908, 0.48843076825141907, 0.1173657476902008, -0.060326848179101944, -0.030601056292653084, 0.011077993549406528, -0.23818030953407288, -0.6751388907432556, 0.07984786480665207, 0.5736868977546692, -0.15991225838661194, 0.23795470595...
functions like those needed to access application-wide login state in other controllers, for example.
[ -0.3098641037940979, -0.4749399423599243, 0.1131659597158432, 0.553630530834198, 0.25571662187576294, -0.24776868522167206, -0.12277068197727203, 0.02999449521303177, -0.19327475130558014, -0.6153791546821594, -0.17671580612659454, 0.41255393624305725, -0.2938522696495056, 0.24032112956047...
In my models I usually have at least 2 'get' routines `$model->get_one()` and `$model->get_where()` and my models often extend a `version_model` which handles db record versions and have routines like `get_record_history()`. All of these routines select the same database fields and do the same table joins. So to make ...
[ 0.3466237485408783, -0.045318007469177246, 0.36040934920310974, -0.1446942389011383, -0.1269245445728302, -0.04280363768339157, -0.010649976320564747, -0.17502835392951965, -0.31170526146888733, -0.7723816633224487, 0.06490566581487656, 0.4493881165981293, -0.3616361618041992, 0.2236416190...
is a better method altogether? **Edit:** The question: is there a better method than the one described above for not repeating table joins in routines that select the same data with different criteria in my model. Is this something that a library like PDO handles? There is a rule of thumb about this called [Rule of th...
[ -0.0996977910399437, 0.2319745421409607, -0.005815170705318451, -0.32143378257751465, -0.22204913198947906, 0.1456567496061325, 0.3815493583679199, -0.8572267889976501, -0.2919929623603821, -0.38949427008628845, 0.1692306101322174, 0.4394983649253845, -0.7689263820648193, -0.50488841533660...
DRY principle, [abstracting](http://en.wikipedia.org/wiki/Abstraction_principle_%28computer_programming%29) everything you can find, resulting in over-complex application. When doing abstraction to apply DRY, it's a good idea to think about cost/benefit ratio. Abstracting common logic takes time, and makes the code m...
[ 0.3218148350715637, 0.23364703357219696, 0.01392672024667263, 0.18722225725650787, -0.11144032329320908, -0.08855486661195755, 0.271604061126709, -0.3455829620361328, 0.10239960253238678, -0.5078059434890747, 0.14653608202934265, 0.6614309549331665, -0.43489694595336914, 0.3318451344966888...
it.](http://en.wikipedia.org/wiki/You_Ain%27t_Gonna_Need_It) [KISS principle.](http://en.wikipedia.org/wiki/KISS_principle)
[ 0.4335499405860901, -0.2510915696620941, 0.6759136319160461, 0.12715454399585724, 0.04810190945863724, -0.23365069925785065, 0.11188916862010956, 0.006589848082512617, 0.34392213821411133, -0.14238305389881134, -0.16705264151096344, 0.7277606725692749, -0.05220657214522362, -0.291596382856...
I've create a prototype based class `Person` that opens a WebSocket connection and defines callback functions as prototype methods. Because inside the callback `this` will refer to the WebSocket object I used another variable to hold on to the `Person`'s `this`. However when I deal with multiple instances the variable...
[ -0.21267913281917572, 0.01944558322429657, -0.08517688512802124, 0.040794119238853455, -0.010220643132925034, 0.11414903402328491, 0.14875291287899017, -0.21510645747184753, 0.08610476553440094, -0.7174462080001831, 0.37558168172836304, 0.18492065370082855, -0.3023776710033417, 0.601048469...
self.pointCount = 0 self.ws = new WebSocket("ws://" + host + ":" + port) self.ws.onopen = self.onOpenConnection }, onOpenConnection : function() { console.log(this) // prints the websocket console.log(self) // prints the person self.ws.send(self.name) // works only if ...
[ -0.3903515040874481, 0.029769988730549812, 0.5041355490684509, -0.26125118136405945, 0.1813725382089615, 0.36542758345603943, 0.13593345880508423, -0.4109463393688202, -0.3505234718322754, -0.6563107967376709, -0.08138018846511841, 0.4169839918613434, -0.3611466884613037, -0.09563002735376...
Person("Adam") console.log(p1.getName()) // Prints Adam console.log(p2.getName()) // Prints Adam p1.openConnection("localhost", 7000) // opens connection for p1 p2.openConnection("localhost", 7000) // opens another connection for p1 ``` If more than one `Person` is created, then when trying to send a message vi...
[ -0.4641249179840088, -0.032214920967817307, 0.12953698635101318, -0.11834952235221863, 0.0008356283069588244, 0.3247547745704651, 0.4677385687828064, -0.09121112525463104, -0.2522026002407074, -0.5871871709823608, -0.20372316241264343, 0.47608813643455505, -0.2359449416399002, 0.2814289331...
all instances. Local variables, must have `var`, `let` or `const` in front of them like one of these: ``` var self = this; const self = this; let self = this; ``` But, that isn't your solution here. You need to be using `this` instead. And, if you're going to supply a callback for the websocket and you want the pers...
[ -0.3540211319923401, 0.30234086513519287, 0.13510873913764954, 0.006041963584721088, 0.018364975228905678, 0.1130143254995346, 0.3642662763595581, 0.16808199882507324, -0.03159460052847862, -0.47054436802864075, -0.22980186343193054, 0.7023806571960449, -0.46753421425819397, 0.296648472547...
this.name = name; } Person.prototype = { getName : function(){ return this.name; }, openConnection : function(host, port){ this.pointCount = 0; this.ws = new WebSocket("ws://" + host + ":" + port); // save person reference on the web socket // so we have access to t...
[ -0.5035151243209839, -0.21801626682281494, 0.14252574741840363, -0.0896853357553482, 0.17140096426010132, 0.3667243421077728, 0.253851979970932, -0.0019038583850488067, 0.019301893189549446, -0.9184660911560059, -0.23536436259746552, 0.300596684217453, -0.06551666557788849, 0.5621997117996...
this.ws.person = this; this.ws.onopen = this.onOpenConnection; }, onOpenConnection : function() { // "this" will be the websocket // "this.person" is the person object console.log(this); // prints the websocket console.log(this.person); // prints the person ...
[ -0.5359008312225342, 0.0329577773809433, 0.16789734363555908, -0.17869849503040314, 0.5821223855018616, 0.12574873864650726, -0.10705268383026123, -0.22057566046714783, -0.26242780685424805, -0.6394183039665222, -0.47392627596855164, 0.4990224242210388, -0.3705601990222931, 0.0124534908682...
I have server (with *Microsoft Windows Server 2003 R2 SE*; manually installed WinRM) when I can enter remote session by simply typing: > Enter-PSSession \*computername\_here\* or (outside remote session) invoke remote command: > Get-Process -ComputerName \*computername\_here\* Unfortunately on another (with *Micros...
[ -0.35933175683021545, 0.16304911673069, 0.5304091572761536, -0.11612661182880402, 0.013745230622589588, -0.026444673538208008, 0.40895986557006836, -0.22769729793071747, -0.16187044978141785, -0.8632894158363342, -0.02134045772254467, 0.447397917509079, -0.21168971061706543, 0.264310061931...
check firewall or configure in special way my server? ================================================================== Thank you for answer. I'm talking about "Microsoft Windows Server 2008 R2 Standard" OS (as "\*gwmi win32\_operatingsystem |select name\*" command told me). > WSManConfig: Microsoft.WSMan.Managem...
[ 0.036663711071014404, 0.2848254144191742, 0.4400619566440582, -0.05103355646133423, 0.2303270399570465, -0.22713607549667358, 0.6770239472389221, -0.19338302314281464, 0.10643725842237473, -0.5820415616035461, -0.1335984170436859, 0.4621909558773041, -0.36840564012527466, 0.101758062839508...