text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
``` [bits 32] global _start section .data str_hello db "HelloWorld", 0xa str_hello_length db $-str_hello section .text _start: mov ebx, 1 ; stdout file descriptor mov ecx, str_hello ; pointer to string of characters that will be
[ -0.42699018120765686, 0.2834387421607971, 0.4928986728191376, -0.277739554643631, 0.20364773273468018, 0.37178340554237366, 0.34931451082229614, 0.07553789019584656, 0.0943600982427597, -0.6520297527313232, -0.49554163217544556, 0.31462180614471436, -0.22989551723003387, 0.1330101788043975...
displayed mov edx, [str_hello_length] ; count outputs Relative addressing mov eax, 4 ; sys_write int 0x80 ; linux kernel system call mov ebx, 0 ; exit status zero
[ -0.3371438980102539, -0.005031050648540258, 0.5433319211006165, -0.3379797339439392, 0.13416782021522522, 0.3176591694355011, 0.3125259578227997, -0.0022173409815877676, -0.01602129265666008, -0.6084290742874146, -0.3109967112541199, 0.6367824673652649, -0.29726076126098633, 0.229975536465...
mov eax, 1 ; sys_exit int 0x80 ; linux kernel system call ``` The fundamental thing here is that I need to have the length of the hello string to pass to linux's sys\_write system call. Now, I'm well aware that I can just use EQU and it'll work fine, but I'm really trying to understand what's going on her...
[ -0.2531870901584625, 0.22757774591445923, 0.5231069922447205, -0.2943710386753082, -0.1555423140525818, -0.077156662940979, 0.26908886432647705, -0.19534938037395477, 0.03340441361069679, -0.673828661441803, -0.14789292216300964, 0.9130787253379822, -0.6213477849960327, 0.01946376077830791...
; of course, without the brackets it'll load the address, which I don't want. I want the value stored at that address ``` instead of loading the value at that address like I expect it to, the assembler outputs RIP-Relative Addressing, as shown in the gdb debugger and I'm simply just wondering why. ``` mov 0x6000e...
[ -0.2291395664215088, 0.12439095228910446, 0.2779008150100708, -0.2111811339855194, -0.14094403386116028, 0.04628670588135719, 0.28934982419013977, -0.026287663727998734, -0.261605829000473, -0.6355873346328735, 0.10496177524328232, 0.8531872630119324, -0.5346465706825256, 0.234189420938491...
different code. I guess I need to truncate the upper 32-bits somehow , but I don't know how to do that. Though did kind of found a 'solution' and it goes like this: load eax with str\_hello\_length's address and then load the contents of address that eax points to and everything is hunky dory. ``` mov eax, str_hello_...
[ 0.2811678349971771, 0.5874648690223694, 0.42371678352355957, -0.08130945265293121, -0.09862889349460602, 0.18952463567256927, 0.18477652966976166, -0.3457544445991516, -0.17596006393432617, -0.28494545817375183, -0.06516008079051971, 0.6259097456932068, -0.6216443181037903, 0.2154570519924...
and operations of these instructions, so I can better understand why how to load effective addresses. Yeah, I guess I could've just switched to EQU and be on my merry way, but I really feel I can't go on until I understand what's going on with the DB declaration and loading from it's address. The answer is it isn't. x8...
[ 0.0813179761171341, 0.12443427741527557, 0.013805539347231388, 0.022121654823422432, -0.22676625847816467, -0.3352314829826355, 0.45387986302375793, 0.0908542051911354, -0.16408252716064453, -0.6945064663887024, -0.07189211994409561, 0.8455473184585571, -0.39436089992523193, 0.296616494655...
32-bit opcodes as 64-bit, and telling you that in 64-bit, those bytes mean a RIP-relative mov. 64-bit and 32-bit opcodes on the x86-64 overlap a lot to make use of common decoding logic in the silicon, and you're getting confused because the code that GDB is disassembling looks similar to the 32-bit code you wrote, but...
[ 0.2627007067203522, 0.26664867997169495, -0.02854529395699501, 0.12391065806150436, -0.09337836503982544, -0.09107071906328201, -0.05671233311295509, -0.055560894310474396, -0.19851554930210114, -0.3715461790561676, 0.010315689258277416, 0.4057362377643585, -0.8553157448768616, 0.186407864...
I have a path that I retrieve with the **pwd** command, I have to modify that path runtime in my shell script. For istance let's say I have */var/www/cgi-script*, I have to modify it in */var/www/etc*. What I am trying to do is retrieve the last index of *"/"*, take a substring and then add *etc*. I tryed with **awk** ...
[ 0.05560039356350899, 0.07324881851673126, 0.4585020840167999, -0.1940138041973114, -0.02828397788107395, -0.04089580848813057, 0.329854279756546, -0.4206642210483551, 0.11554716527462006, -0.7337223887443542, 0.13076268136501312, 0.71656733751297, -0.3259891867637634, 0.010178457014262676,...
I am trying to align a part of text to the right and the other part to the left in an HTML mail but in Outlook the `float` doesn't work. So basically I am looking for `float` CSS in Outlook. I know it sounds pretty creepy and `text-align` or `align=""` didn't work. Any suggestions? ``` <td> <span style="text-align...
[ 0.47858890891075134, 0.10241870582103729, 0.4237569570541382, -0.09856145828962326, -0.35578781366348267, 0.05703122541308403, 0.01946127600967884, 0.061810851097106934, -0.016068700700998306, -0.6934240460395813, 0.18281345069408417, 0.24909843504428864, -0.46574246883392334, -0.195876896...
CSS selectors are available in all email clients and you'll drive yourself mad trying to do it any other way. HTML emails are like the web 5 years ago. There are a couple of good documents on the subject: <https://www.campaignmonitor.com/css/> <http://www.emailology.org/> For your example: ```html <td> <table ce...
[ 0.14942534267902374, -0.16243574023246765, 0.22477611899375916, -0.15024501085281372, -0.5075493454933167, -0.16606883704662323, 0.020137688145041466, -0.04535745456814766, -0.24536433815956116, -0.9286249279975891, 0.3762609660625458, 0.13117526471614838, -0.329024076461792, -0.0534357316...
In my iphone app I have two UITextView inside a cell with frames (65,22,210,25) (65,40,210,25) I fill this textviews with strings which i don't know its length (retrive it from database) My question in tow parts: 1- if the first textview exceed the specific height in its frame it will go over the second textview 2-...
[ 0.351869136095047, 0.11545008420944214, 0.8112053275108337, -0.15013283491134644, -0.07648279517889023, 0.4021151661872864, 0.2421751171350479, -0.658572793006897, -0.2824380099773407, -0.8455529808998108, 0.05091210827231407, 0.41129183769226074, -0.11274257302284241, -0.12295790016651154...
the new heights of textviews and pass it to the delegate ``` -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath ``` any better solutions ? In a sorted container, the last element that is less than or equivalent to `x`, is the element before the first element that is greater...
[ -0.2670038044452667, -0.03142126649618149, 0.8112175464630127, 0.018000662326812744, -0.053853027522563934, -0.01623298041522503, 0.12056783586740494, -0.2518216669559479, -0.1548032909631729, -0.8533648252487183, -0.4543823301792145, 0.44623035192489624, -0.02256975695490837, -0.004974103...
I am new to mutli-threading in java and trying to understand the keyword **synchronization** I have following code: ``` class LockObject { int threadsGoingThrough = 0; synchronized void locked() { threadsGoingThrough++; try { wait(1000); } catch (Exception e) { ...
[ 0.28538423776626587, -0.019088489934802055, 0.49806252121925354, -0.21900522708892822, 0.2068377435207367, -0.16854830086231232, 0.3970384895801544, -0.38904306292533875, -0.1331443339586258, -0.5532164573669434, 0.05155368149280548, 0.2566331923007965, -0.34835541248321533, 0.343535900115...
if (threadsGoingThrough > 1) { System.out.print(" !! ouups !! "); } ; threadsGoingThrough--; } } ``` The Thread-class: ``` class LockTester extends Thread { LockObject myLock; String message; public void run() { while (true) {
[ 0.03182179108262062, -0.10592597723007202, 0.5780004262924194, -0.3857353925704956, 0.4502852261066437, -0.09943630546331406, 0.36843737959861755, -0.09053105115890503, -0.3233901858329773, -0.3725554943084717, -0.33378827571868896, 0.5375035405158997, -0.4548865854740143, 0.61683875322341...
myLock.locked(); System.out.print(message); } } } ``` My main looks like this: ``` LockObject theLock = new LockObject(); LockTester threadA = new LockTester(); threadA.myLock = theLock; threadA.message = "A"; LockTester threadB = new LockTester(); threadB.myLock = theLock; threadB.message =...
[ 0.056911859661340714, 0.0015823517460376024, 0.731495201587677, -0.4327700734138489, 0.31745645403862, 0.07198397070169449, 0.42304420471191406, -0.03884026035666466, -0.46137142181396484, -0.5334873199462891, -0.1893843412399292, 0.37091025710105896, -0.6965149641036987, 0.392545163631439...
method at the same time. How can this happen? You're calling `wait()`, which will release the lock of the monitor it's called on. It will then reacquire the lock when it wakes up (either due to timeout or the monitor being notified). If you were just trying to sleep for a second, use `Thread.sleep(1000)` which *won't* ...
[ 0.47275310754776, -0.5161556005477905, 0.22628112137317657, 0.21795086562633514, 0.22293657064437866, 0.010413145646452904, 0.1967959851026535, -0.3424498736858368, -0.4835265874862671, -0.497813880443573, 0.1415252685546875, 0.26642781496047974, -0.34418684244155884, 0.3276230990886688, ...
One day I couldn't remember where my main working directory for my folder was, so I just decided to clone the project from the "git@github.com:" address that's on the github web page. I didn't know what I was doing that day, and I created a bunch of stuff after that in the directory. Then I did git add, git clone, and...
[ 0.5706942081451416, 0.34011325240135193, 0.4059676229953766, 0.014772648923099041, -0.05218468979001045, 0.0730360895395279, -0.1810171753168106, 0.3474571406841278, -0.35530832409858704, -0.6396080851554871, 0.15713302791118622, 0.06299170106649399, -0.04876202344894409, 0.628237843513488...
today, and did some 'add' and some 'push'. It went to the master 'branch' (which I expected, because I kinda gave up hope on the other weird branch). But my problem is now this: When my users (I tried this on another machine myself) do a git clone by using the address that github gives me on the main page of my proje...
[ 0.5597976446151733, 0.052046217024326324, 0.3100225329399109, 0.1750936359167099, 0.03492683917284012, -0.06832725554704666, 0.2177698314189911, 0.26641228795051575, -0.19804157316684723, -0.7436427474021912, 0.051838379353284836, 0.25868144631385803, -0.2244013100862503, 0.380606770515441...
in the master branch). Q2: how do I remove the 'gh-pages' branch from the github site? I decided to abandon it. If you have a better suggestion, I'm receptive to that too. Q3: Bonus points if you can tell me what I should have done earlier on, once I realized I have two places on my pc that has code for two separate...
[ 0.3115442395210266, -0.2169436812400818, 0.6225656270980835, 0.14520853757858276, -0.13152971863746643, -0.00824615079909563, -0.016447249799966812, -0.015386026352643967, -0.12379386276006699, -0.7466489672660828, -0.41602686047554016, 0.3282669484615326, -0.09364889562129974, 0.372169911...
with ``` $ git help command ``` e.g. ``` $ git help clone ```
[ -0.07620298862457275, 0.14109112322330475, 0.011668052524328232, -0.049149226397275925, 0.4148600101470947, -0.144474595785141, 0.2308996468782425, 0.08364138752222061, 0.1712733954191208, -0.8217941522598267, -0.5304175019264221, 0.7152783274650574, -0.5213926434516907, 0.1733707189559936...
I need a SQL condition to get rows from a table that were created between 6:00 a.m yesterday and 7:00 a.m today. The table has a `creationDate` field. This is the approach I was thinking of ``` select * from myTable where creationDate = DATE_SUB(CONCAT(CURDATE()), INTERVAL 1 DAY) ``` I'm using mysql server 5. A...
[ 0.14299724996089935, 0.13446561992168427, 0.47590330243110657, -0.11587245762348175, 0.16925619542598724, 0.10872829705476761, -0.06030919402837753, 0.09871922433376312, -0.12023374438285828, -0.9507973790168762, 0.02522907592356205, 0.2223467081785202, 0.1947539895772934, 0.59469455480575...
time value, i.e. ' 06:00:00' EDIT cause of further specification in comment: ``` SELECT * FROM mytable WHERE (creationDate >= date(date_sub(now(), interval 1 day)) AND creationTime >= '06:00:00') AND (creationDate <= date(now()) AND creationTime <= '07:00:00') ``` Yes, it needs to be this clumsy now, because if you...
[ 0.16988851130008698, -0.053920015692710876, 0.24773889780044556, -0.023286359384655952, 0.22120682895183563, 0.19055922329425812, 0.16923366487026215, -0.08403279632329941, -0.061432503163814545, -0.8726661205291748, 0.08900018781423569, 0.2453446388244629, 0.1487904042005539, 0.6022382378...
I downloaded MVC Fool Proof Validation from <http://foolproof.codeplex.com/> Beacuse I am in need of [RequiredIf]. When I installed MVC Fool Proof Validation I recieved three Javascript files which are these that I am using inside my layout: ``` <script src="@Url.Content("~/Scripts/mvcfoolproof.unobtrusive.min.js")...
[ 0.14557971060276031, 0.6096614599227905, 0.5865031480789185, -0.32261601090431213, -0.3108969032764435, -0.007281993515789509, 0.5778896808624268, -0.7717708349227905, 0.18733878433704376, -0.3180203139781952, 0.26670634746551514, 0.879076361656189, -0.15756884217262268, -0.385476440191268...
here](https://i.stack.imgur.com/mpCQZ.png) I have not even edited anything inside the JS files :S Any solutions is appreciated! Thanks in advance! Looks like you included the scripts before you include jQuery. You should include jQuery before these scripts
[ 0.27210408449172974, 0.01891220733523369, 0.22732429206371307, 0.3964282274246216, -0.12073983252048492, -0.2695643901824951, 0.2513883411884308, 0.29269537329673767, -0.36138877272605896, -0.5934960842132568, -0.21407251060009003, 0.6033787727355957, -0.03406094014644623, -0.5096316337585...
To do that, i'm trying to use GIT. --- I'm trying to develop a .sh script (under linux) to auto-commit all changes in a git repository and delete all history revision except last one. The repository must preserve only last commit data and clear all previous history (losing all data). For example, i commit 3 files: ...
[ 0.10313848406076431, 0.31230437755584717, 0.5487115383148193, -0.0648871436715126, -0.08512167632579803, 0.06000979244709015, 0.5001507997512817, -0.09236066788434982, -0.31014326214790344, -0.9124757051467896, -0.14437390863895416, 0.5159730315208435, -0.14465875923633575, 0.3075749874114...
to obtain a smallest possible .git folder. The problem is that I need to do that with ONE SINGLE NON-INTERACTIVE COMMAND LINE, because I need to do a cron script. Browsing forums for hours I don't found solutions for this question. --- The real question is: How to set up a bi-directional fast file sync? The folder...
[ 0.06523443013429642, -0.10449248552322388, 0.4036441445350647, 0.3661883771419525, -0.0030417831148952246, -0.050986163318157196, 0.07990916818380356, 0.1692502796649933, -0.3884762227535248, -0.8365082144737244, 0.1552031934261322, 0.6062397360801697, -0.021332014352083206, -0.06168084219...
You should include jQuery before these scripts
[ 0.170505091547966, 0.28310948610305786, 0.050309184938669205, 0.15570859611034393, -0.06727337092161179, -0.3112036883831024, -0.1831640750169754, 0.5413905382156372, -0.08128853142261505, -0.5647736191749573, -0.17429304122924805, 0.37485918402671814, 0.22370362281799316, -0.4971664547920...
I'd like to format an integer in a way that it has leading zeros **and** thousand separators at the same time. I know that `someInt.ToString("D6");` will give me leading zeros, but apparently it doesn't allow `NumberGroupSeparator`. On the other hand `someInt.ToString("N");` will give me separators but no leading zero...
[ 0.4310463070869446, 0.05457712337374687, 0.09494411945343018, 0.017309051007032394, -0.04307621717453003, 0.017698071897029877, 0.002357454039156437, -0.30771875381469727, -0.3601699471473694, -0.410620778799057, 0.3145798146724701, 0.4334971010684967, -0.13622982800006866, 0.1003196612000...
123 456, just do: ``` 123456.ToString("00 000 000") ``` If you need a fixed amount of zero's, all I can think of is this: ``` int NUM_LENGTH = 6; //This is not very elegant var NUM_STR = String.Join("", Enumerable.Range(0, NUM_LENGTH).Select((x, i) => (NUM_LENGTH - i) % 3 == 0 ? " 0" : "0")); //But at least it wo...
[ 0.42119699716567993, 0.13148602843284607, 0.45594629645347595, -0.19846957921981812, -0.16578379273414612, -0.00010844330972759053, 0.1404150426387787, -0.6954579949378967, -0.14704063534736633, -0.10772158950567245, 0.2224336862564087, 0.40301987528800964, -0.06372557580471039, 0.09425583...
Does any1 know how to make this code --> To prevent and ignore any other inputs for over 2 seconds after it is being executed? It's seems a very easy question, but l'm been struggling for 2 days googling for this, pls help. ``` public void PressCOM(string key) { if (key == "P") { PressP("p"); R...
[ 0.03265140578150749, -0.18548716604709625, 0.3585761785507202, -0.17817093431949615, 0.15119335055351257, -0.16736292839050293, 0.029355335980653763, 0.002955100266262889, -0.22592271864414215, -0.4234413206577301, -0.617474377155304, 0.5561538934707642, -0.47347524762153625, -0.0999913960...
application classes/resources first). For a single application class loader, the class path ordering will be: 1. module class paths 2. dependency class paths (Class-Path in MANIFEST.MF) 3. shared library class paths There is no configuration option to change the ordering. I do not think this ordering is explicitly st...
[ 0.14131174981594086, -0.17853020131587982, 0.2616463005542755, 0.15173469483852386, -0.04821690917015076, -0.014788152649998665, -0.02387697622179985, -0.32711970806121826, -0.3356570303440094, -0.9335405230522156, -0.1524888575077057, 0.4750358462333679, -0.5360815525054932, 0.16949713230...
Currently, [the .NET Framework 4.5 runs only on Windows 7 and above](http://msdn.microsoft.com/en-us/library/8z6watww(v=vs.110).aspx): ``` Operating system Version 4.5 Beta -------------------------------------------------------- Windows 8 Consumer Preview √ (see notes) Windows 7,...
[ 0.28143393993377686, 0.1144462525844574, 0.5383467674255371, -0.24694931507110596, -0.03740660473704338, 0.0848446935415268, 0.04973775893449783, 0.1849042922258377, 0.09929078072309494, -0.5014573931694031, -0.33745652437210083, 0.7476720213890076, -0.2531551420688629, 0.10009936988353729...
XP Professional, all editions — ``` While I understand that XP support is being dropped, I'm a bit surprised by the decision not to support Vista. (After all, .NET 4 supported XP and above.) Is there any indication (press announcements, MSDN blog entries, ...) that more operating systems will be supported when ....
[ 0.35641077160835266, 0.2473006397485733, 0.9539874196052551, -0.1499289572238922, -0.08209910988807678, -0.3803253173828125, 0.4096176028251648, -0.20697663724422455, 0.2915363013744354, -0.10819248110055923, -0.4502267837524414, 1.0814076662063599, -0.03112376667559147, -0.326540857553482...
I have the below code: ``` public void OpenFile(string FileName) { if (FileName == null) throw new ArgumentNullException("FileName", "OpenFile: Filename is null"); List<int> readItems = new List<int>(); using (StreamReader reader = new StreamReader(F...
[ 0.007231794763356447, -0.09551692008972168, 0.6020488142967224, -0.22223982214927673, 0.12731094658374786, 0.06496832519769669, 0.1827879399061203, -0.31993532180786133, 0.11524612456560135, -0.8439264893531799, -0.13177962601184845, 0.623626172542572, -0.32079777121543884, 0.3862410485744...
{ string line; int batchItem; while ((line = reader.ReadLine()) != null) { if (int.TryParse(line, out batchItem))
[ -0.16710461676120758, -0.3134945333003998, 0.46115344762802124, -0.411035418510437, 0.4034695029258728, 0.5151869654655457, 0.5041266679763794, -0.13786785304546356, 0.18395701050758362, -0.41521796584129333, -0.39451566338539124, 0.2347881942987442, -0.5438826680183411, 0.3478363156318664...
{ readItems.Add(batchItem); } } }
[ -0.061767108738422394, -0.07374350726604462, 0.006208362057805061, -0.3127659261226654, 0.31782349944114685, 0.08345289528369904, 0.2948479950428009, 0.20267871022224426, -0.11764167994260788, -0.5797820091247559, -0.07815764844417572, 0.4916759729385376, -0.4956611096858978, 0.14110992848...
CurrrentFile = FileName; FileInfo f = new FileInfo(FileName); lock (LockObject) { TextWriter = f.AppendText(); TextWriter.AutoFlush = true; }
[ -0.22790905833244324, -0.1582091897726059, 0.7869394421577454, -0.24850642681121826, 0.27033182978630066, 0.3306383788585663, 0.4188729226589203, -0.41514691710472107, 0.05772486329078674, -0.41779401898384094, -0.27606576681137085, 1.0485187768936157, -0.6692718863487244, 0.20440101623535...
if (readItems.Count > 0) FileOpened(readItems); } ``` I am trying to detect possible problems eg/ Filename is null. In the class that catches and logs exceptions I obviously have a `catch(ArgumentNullException ex)` Should I also be catching possible exceptions thrown by the `StreamReader` ...
[ -0.07555102556943893, -0.06470189243555069, 0.11841296404600143, -0.07060418277978897, 0.1129312589764595, -0.3038496673107147, 0.3464525640010834, 0.07139796763658524, -0.29879429936408997, -0.5156620144844055, -0.16041547060012817, 0.6469742655754089, -0.44901299476623535, 0.062349233776...
`catch(Exception ex)` or have a try catch around the above code and rethrow a custom exception. Otherwise my try/catch block has about 12 separate catch statements! In general if you follow a few simple rules you can drastically simplify your Exception Handling code. **1. Only catch and handle exceptions you can actua...
[ 0.2303091287612915, -0.17555195093154907, -0.11684095859527588, 0.030446993187069893, -0.05081376060843468, -0.35210150480270386, 0.45313578844070435, -0.05395885556936264, -0.3007514774799347, -0.6682193875312805, -0.2355034351348877, 0.5843497514724731, -0.5177894234657288, -0.2241253256...
DoSomeStuff(); } catch(HolyCrapItBlewedUpException ex) { RecoverFromExplosion(); } catch(Exception ex) { //I really have no idea what happened, and I can't do // anything about it, but I'm going to catch the // exception anyway cause it makes me feel better } ``` There are ***cough*** exceptions to the ru...
[ 0.3083142042160034, -0.10477547347545624, 0.6417950987815857, -0.03728768602013588, 0.24184496700763702, -0.43922510743141174, 0.5136559009552002, -0.21226653456687927, -0.2713794708251953, -0.5666333436965942, -0.10082320868968964, 0.6480709910392761, -0.29670336842536926, 0.1207553595304...
logging that exception and presenting some friendly message to the user. ``` try { DoSomeStuff(); } catch(Exception ex) { //At this point it's a bug... we need to squash it! LogException(ex); ShowUserRecoveryOptions(); } ``` Another place you might want to do this is in order to maintain a contract for a...
[ 0.28384461998939514, -0.011663520708680153, 0.29101449251174927, -0.24349777400493622, 0.3576315641403198, -0.1922980546951294, 0.5822727084159851, -0.1348327249288559, -0.2042943835258484, -0.5174193382263184, -0.15282638370990753, 0.5062296986579895, -0.6612405180931091, 0.07692611962556...
{ //It's still best to distinguish between certain exceptions // as long as it makes sense to the caller. throw new NoIWillNotMakeYouASandwichException(ex); } catch(Exception ex) { throw new SorryICantMakeYouASandwichException(ex); } } ``` **3. Avoid Exceptions Like The Plague!** ...
[ 0.14974889159202576, 0.016150379553437233, -0.019035961478948593, -0.24691125750541687, -0.040925636887550354, -0.12794283032417297, 0.7959097027778625, -0.05548136681318283, -0.46665456891059875, -0.6384783983230591, -0.1609582155942917, 0.3379935622215271, -0.3323650062084198, -0.0721398...
is checking for the existence of a file. ``` try { File.Open("blah.txt"); } catch(FileNotFoundException ex) { File.Create("blah.txt"); } ``` In that example, I knew it was possible the file would not exist... so I should have written code to make sure that case *almost* never happens. ``` var fileName = "blah...
[ 0.4752267599105835, 0.1162087470293045, 0.2846936583518982, -0.1079038679599762, 0.27981486916542053, -0.42394208908081055, 0.5766139030456543, 0.011834844946861267, -0.3761591613292694, -0.6738368272781372, -0.05857894569635391, 0.5681799650192261, -0.3262133300304413, 0.20833829045295715...
I have an xml from which I am trying to extract some information through LINQ query. The format of the xml file looks like the following: ``` <TopNode> <Sample name="Tom" id="0" batch="1"> <Sequences> <NextItem id="10">Stand1 &gt;</NextItem> <PreviousItem id="9">Stand2 &gt;</PreviousItem> </Se...
[ 0.08627034723758698, 0.23927658796310425, 0.6478992104530334, -0.20434503257274628, 0.20449717342853546, 0.2562907934188843, 0.12061149626970291, -0.4752780795097351, -0.3666743040084839, -0.31845521926879883, -0.2278471440076828, 0.26347798109054565, 0.2071579545736313, 0.250202476978302,...
a list of attributes of both `NextItem` and `PreviousItem` from the query. For this, I defined a class to get my results. ``` public class Extract { public string name { get; set; } public int _id { get; set; } } ``` LINQ Query (foreach Sample node, get the PreviousItem and NextItem content in class object): ``` v...
[ -0.1022329181432724, -0.008431557565927505, 0.4913596212863922, 0.12095121294260025, 0.3631901144981384, 0.04916989430785179, -0.2020946592092514, -0.64690101146698, -0.13263173401355743, -0.4416448771953583, -0.30319005250930786, 0.41235387325286865, -0.012526684440672398, 0.0339961759746...
query for both NextItem and PreviousItem? **EDIT** On the whole, I have to get an IEnumerable for each for each of the `Sequence` nodes, and then return the overall IEnumerable from thie query. **EDIT2** Assigning `key` here is giving me this error. Query below ``` var mapping = XDocument.Load("file.xml") ...
[ -0.12134174257516861, -0.26842421293258667, 0.40317606925964355, -0.08043663948774338, 0.3319133520126343, 0.14523597061634064, -0.08478622883558273, -0.3899476230144501, -0.06113257259130478, -0.8441476225852966, -0.1271330565214157, 0.18154370784759521, -0.03793611004948616, 0.2239869832...
.Union(n.Descendants("NextItem")) .Select(n1 => new Extract { _id = (int)n1.Attribute("id"), Name = n1.Value }) ).ToDictionary<IEnumberable<Menu>, int>(key =>
[ -0.1223115399479866, -0.6183415651321411, 0.6208639740943909, -0.2691647708415985, 0.3885166049003601, 0.4097718894481659, 0.2600523829460144, -0.3905823826789856, 0.06039101630449295, -0.7202059030532837, -0.2856157124042511, 0.4855962097644806, -0.3026759624481201, 0.22686061263084412, ...
key._id);//and further converting this dictionary to sorted dictionary (sorted accordign to keys) ``` ``` var xDoc = XDocument.Load(....); var result = xDoc.Descendants("NextItem") .Union(xDoc.Descendants("PreviousItem")) .Select(n => new {ID = n.Attribute("id").Value, Name =n.Name, Value =n.Value }); ``` **--ED...
[ -0.30744561553001404, -0.19953833520412445, 0.5641759037971497, -0.12035736441612244, 0.5420529246330261, 0.3127712309360504, -0.0867292657494545, -0.5833649039268494, -0.2530083954334259, -0.42884841561317444, -0.43134769797325134, 0.32908913493156433, -0.062377799302339554, 0.38112252950...
Name = n2.Name, Value = n2.Value }) ); ```
[ -0.3236545920372009, 0.09952201694250107, 0.33474695682525635, -0.5224126577377319, 0.2644079923629761, -0.025590110570192337, 0.25320321321487427, -0.2121778279542923, 0.011836456134915352, -0.2716776728630066, -0.6304514408111572, 0.626733124256134, -0.47775354981422424, 0.42798319458961...
Nuget packages download Javascript files to ~/Scripts I prefer to keep my content organized in a ~/content folder, which contains ``` ~/content/css ~/content/images ~/content/scripts ~/content/scripts/vendor (for packages/ downlaoded scripts) ~/content/scripts/site (my own site's JS) ``` How do I make Nuget downloa...
[ 0.23645752668380737, 0.1636684685945511, -0.13966841995716095, -0.20045118033885956, -0.5717360973358154, -0.0866946280002594, 0.06700742989778519, -0.1251620054244995, -0.17425401508808136, -0.8681656122207642, -0.10677091777324677, 0.2148616760969162, -0.19285106658935547, 0.113431833684...
I use Windsor container in purpose of SolrNet multicore access, but my Solr cores requires basic authentication. Is it possible use SolrNet Windsor intergation with authentication? I'm tried next: ``` static SolrInteractServer() { container.Register(Component.For<ISolrConnection>().ImplementedBy<SolrConne...
[ -0.20964017510414124, 0.1633751392364502, 0.855791449546814, -0.12560681998729706, 0.2081184834241867, 0.29241353273391724, 0.4351365268230438, -0.4689702093601227, -0.054716259241104126, -0.6586123108863831, -0.060407981276512146, 0.479797899723053, -0.2108197957277298, 0.3014341592788696...
facility = new SolrNetFacility(baseHttpUrl); } else { facility = new SolrNetFacility(); } foreach (var httpUrl in coreUrls) { var coreName = "core_" + Guid.NewGuid();
[ -0.23946332931518555, -0.2444700300693512, 0.922260582447052, -0.335863322019577, 0.2189955711364746, 0.16466929018497467, 0.3146384060382843, -0.10226792842149734, -0.14350250363349915, -0.6722264885902405, -0.3868841826915741, 0.41871213912963867, -0.16176465153694153, 0.3843232989311218...
facility.AddCore(coreName, typeof(T), httpUrl); RegisteredCores.Add(coreName, new KeyValuePair<Type, string>(typeof(T), httpUrl)); } container.AddFacility("solr", facility); } public static Dictionary<string, KeyValuePair<Type, string>> RegisteredCores = new Dictionary<string, KeyV...
[ -0.2198457270860672, -0.2703408896923065, 0.7017295360565186, -0.22224880754947662, -0.01234467327594757, 0.08351239562034607, 0.12309704720973969, -0.23354566097259521, -0.21105027198791504, -0.8183680772781372, -0.24912676215171814, 0.4452679455280304, -0.3070070147514343, 0.371225953102...
at > Castle.MicroKernel.SubSystems.Naming.DefaultNamingSubSystem.Register(IHandler > handler) at > Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.RegisterHandler(String > name, IHandler handler, Boolean skipRegistration) at > Castle.MicroKernel.Handlers.DefaultHandlerFactory.Create(ComponentMo...
[ -0.4792783856391907, 0.006679578684270382, 0.6243760585784912, 0.0006560627953149378, 0.20174704492092133, 0.5265930891036987, 0.33247488737106323, -0.6487748622894287, -0.28294241428375244, -0.544308602809906, -0.5252223610877991, 0.4275951087474823, -0.3158334791660309, 0.411892861127853...
projects\1. In Progress\Semantic > Force\Reporting\SFDigestGenerator\SolrInteractionTest\Program.cs:line > 26 at System.AppDomain.\_nExecuteAssembly(RuntimeAssembly assembly, > String[] args) at > Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > > at System.Threading.ExecutionContext.Run(Exec...
[ 0.5163885354995728, -0.18454070389270782, 0.47936034202575684, 0.002108960412442684, 0.24282880127429962, 0.0513945147395134, 0.2853098511695862, -0.320177286863327, -0.29098594188690186, -0.9864822626113892, -0.15953421592712402, 0.0742291584610939, -0.31396061182022095, 0.082261018455028...
So I have the following code: ``` echo '<li><a href="'.$Website.$Elements[2].'/'.$Row["povezava"].'" class="leftMenuArticlesInactive"></a><li>'; ``` 1. $Website contains: <http://www.somesite.com/test/> 2. $Elements[2] contains: sometext 3. $Row["povezava"] contains: sometext2 All variables have nothing but letters...
[ 0.17066320776939392, 0.27489063143730164, 0.45462051033973694, -0.31547942757606506, -0.22618980705738068, 0.13072918355464935, 0.452288955450058, -0.22594214975833893, -0.014848064631223679, -0.43644917011260986, -0.2876895070075989, 0.29202720522880554, 0.02328544296324253, 0.17529015243...
while($Row = mysql_fetch_array($Query)) { $s = '<li><a href="'.$Website.$Elements[2].'/'.$Row["povezava"].'" class="leftMenuArticlesInactive">'; for($i = 0; $i < $Spacing;$i++) { $s .= '&nbsp;'; } $s .= $Row["ime"].'</a></li>'; echo $s;
[ -0.18599888682365417, -0.12937591969966888, 0.5200887322425842, -0.2936699092388153, 0.20788490772247314, 0.29314330220222473, 0.6715744733810425, -0.3626837134361267, -0.1486634612083435, -0.2562972903251648, -0.603703498840332, 0.38932302594184875, -0.250764399766922, 0.2034451812505722,...
ShowMenuOfParent($Row["id"], $Spacing + 8); } } } $Query = mysql_query("SELECT * FROM `izdelki_meni` WHERE `stars` = 0;"); if(mysql_num_rows($Query) != 0) { echo '<ul>'; while($Row = mysql_fetch_array($Query)) { echo '<li><a href="'.$Website.$Row["povezava"].'" class="leftMenuArticlesActive...
[ -0.05931547284126282, -0.06027861312031746, 0.8863470554351807, -0.5115191340446472, -0.1831110566854477, 0.19489729404449463, 0.388176828622818, -0.6205548644065857, -0.12094008922576904, -0.14068488776683807, -0.3762098550796509, 0.3370938003063202, -0.41824641823768616, 0.19585846364498...
echo '</ul>'; } ``` > Why can't I echo $Elements[2] along with a few other variables? Actually, `echo` can do that, so only this part of your question remains unresolved: > Why can't I? What you can and what you can not often depends on what you've learned so far to do. As learning is subjective, it's hard to answe...
[ 0.3912416100502014, 0.44500473141670227, -0.21291610598564148, 0.13052786886692047, -0.3617109954357147, 0.07179827988147736, 0.4434264004230499, -0.41692137718200684, -0.023610219359397888, -0.2961543798446655, 0.09792084246873856, 0.3677888810634613, -0.32845428586006165, 0.0602381154894...
and you would like to fix it, but what you actually do is that you make your problem bigger than it is by posting it here as an invitation for others to even do more guessing. I mean 10 persons are able to guess more than one person. So the way you ask is actually counter-productive and not helpful. Both for yourself a...
[ 0.5864040851593018, 0.07588545233011246, -0.06444334983825684, 0.23757138848304749, -0.19116519391536713, 0.02529696747660637, 0.1587146669626236, 0.4851219356060028, -0.3529631197452545, -0.3626938462257385, 0.1381741762161255, 0.25816020369529724, -0.13770148158073425, 0.0209937952458858...
like this: http://www.somesite.com/test/sometext/sometext2 ``` And the code you've posted that is related to the output is: ``` echo '<li><a href="'.$Website.$Elements[2].'/'.$Row["povezava"].'" class="leftMenuArticlesInactive"></a><li>'; ``` You write that `$Website` ends with `/test/`, and additionally there is ...
[ 0.5964335799217224, 0.16531813144683838, 0.22200380265712738, 0.02469206601381302, -0.01092788577079773, -0.06856478750705719, 0.3417420983314514, 0.12707628309726715, -0.1922033429145813, -0.3394152820110321, -0.05703919380903244, 0.3899042010307312, -0.037768006324768066, 0.1344043761491...
you do. Take the time to setup yourself the xdebug debugger and step through your code then. It helps you to locate errors very quickly. And not only this time but also in the future.
[ 0.5278868675231934, 0.21547944843769073, 0.27491509914398193, 0.2920312285423279, 0.29470279812812805, -0.4698662757873535, 0.2062257081270218, 0.21059206128120422, 0.09562735259532928, -0.7807938456535339, 0.05206665024161339, 0.566252589225769, -0.05747613310813904, -0.09638157486915588,...
I created a customized CursorAdapter and want to select a list item, in order to start an action in onOptionsItemSelected. Creating List View: ``` public void onCreate(Bundle savedInstanceState) { Log.d(TAG, "onCreate called"); super.onCreate(savedInstanceState); Log.d(TAG, "create DatabaseOpenHelper"); ...
[ 0.20111079514026642, -0.3151869773864746, 0.6726013422012329, 0.055624693632125854, 0.13249430060386658, 0.08513500541448593, 0.24965807795524597, -0.39506828784942627, -0.05048733949661255, -0.582282304763794, -0.15218409895896912, 0.36652711033821106, -0.4928271770477295, 0.3424505889415...
Log.d(TAG, "set NoteCursorAdapeter"); setListAdapter(new NoteCursorAdapter(this, data)); } ``` onOptionItemSelected: ``` public boolean onOptionsItemSelected(MenuItem item) { Log.d(TAG, "onOptionItemSelected called"); switch (item.getItemId()) { case R.id.conference_note_menu_new: Toast.mak...
[ -0.128041073679924, 0.10259923338890076, 0.4315878748893738, -0.38043269515037537, 0.1614210605621338, -0.05264533683657646, 0.14746680855751038, -0.158372163772583, -0.18907354772090912, -0.3767443895339966, -0.9206022024154663, 0.5839245319366455, -0.12683787941932678, 0.1917938292026519...
Toast.LENGTH_LONG).show(); return true; case R.id.conference_note_menu_delete: Toast.makeText(this, "Es sind keine Einstellungen verfügbar", Toast.LENGTH_LONG).show(); return true; default: return super.onOptionsItemSelected(item); } } ``` Can't find any u...
[ -0.03684326633810997, 0.3935476243495941, 0.6033525466918945, -0.40541309118270874, 0.031825531274080276, -0.24558353424072266, 0.5976632237434387, -0.21938760578632355, -0.3849790692329407, -0.7393283247947693, -0.44624796509742737, 0.676173985004425, -0.14002634584903717, 0.3327478468418...
arg2, long arg3) { // TODO Auto-generated method stub } ```
[ -0.33324941992759705, -0.03847493976354599, 0.18901307880878448, -0.5057061314582825, -0.3033718764781952, 0.09731364995241165, 0.4383949637413025, -0.4139782190322876, 0.08242212980985641, -0.12185762077569962, -0.1710125058889389, 0.4959779381752014, -0.5565677285194397, -0.0688117220997...
I have this script which simply kills an app ``` KEY_NAME=/some/path kill `ps -ef | grep $KEY_NAME | grep -v grep | awk '{ print $2 }'` exit 0 ``` If I write the kill command manually as a oneliner than it works. But I have to run it as a script which doesn't work. So I tried to debug it and here is the result ```...
[ 0.27565523982048035, 0.49522483348846436, 0.21121840178966522, -0.05823522061109543, -0.07640330493450165, 0.33129242062568665, 0.3750246465206146, -0.04359818994998932, -0.19238564372062683, -0.5583197474479675, 0.15721851587295532, 0.32542330026626587, -0.5578638911247253, 0.219374492764...
How can i get rid of them? Might be the case is number of pid's returned are more than 1 Change your line to ``` ps -ef | grep $KEY_NAME | grep -v grep | awk '{ print $2 }'|xargs kill ```
[ 0.17551252245903015, 0.011308844201266766, 0.5019815564155579, 0.22630906105041504, 0.06657229363918304, 0.32295793294906616, 0.5116086602210999, 0.12259314954280853, -0.13349796831607819, -0.4818836450576782, -0.1765146255493164, 0.2292441427707672, -0.45451322197914124, 0.271910399198532...
This would be a HTML file: ``` <li class="msgln">hello</li><li class="msgln">hi</li><li class="msgln">hey</li> ``` And php script: ``` $fp = fopen("file.html", 'a'); .... fclose($fp); ``` How to remove first `<li class="msgln">hello</li>`? Content in `<li>` is dynamically changed This will work even if the first...
[ -0.34887227416038513, -0.23660686612129211, 0.45928439497947693, -0.11110924184322357, 0.23773814737796783, 0.2934040129184723, 0.14704057574272156, -0.592045247554779, -0.1322491616010666, -0.6051465272903442, -0.5785691142082214, 0.18857978284358978, -0.3170236647129059, 0.18789631128311...
When my code reaches CampaignRepository.saveChanges() it gives and error that the relation can not be modified, key properties can not be null. But if I debug it and look into the contents of the current object all primary keys and foreign keys are set. I have no clue why it's going wrong... ``` public ActionResult Up...
[ 0.13109397888183594, -0.005178635939955711, 0.9387252330780029, -0.3828735053539276, 0.06925948709249496, 0.12150972336530685, 0.3976971209049225, -0.2545684278011322, -0.04466395825147629, -0.741705596446991, -0.21219363808631897, 0.7636345624923706, -0.18131829798221588, 0.03936428949236...
public void UpdatePage(LandingPage update) { foreach (Page page in Pages) { if (page.Id == update.Id) { Pages.Remove(page); break;
[ -0.06940443068742752, 0.13422642648220062, 0.6528487205505371, -0.2547280788421631, 0.16365177929401398, -0.09101474285125732, 0.26533234119415283, -0.030260667204856873, -0.11024530231952667, -0.5298628211021423, -0.6548296809196472, 0.17707817256450653, -0.5265724658966064, 0.23829686641...
} } Pages.Add(update); } ``` > de relatie kan niet worden gewijzigd, omdat voor een of meer van de > referentiële-sleuteleigenschappen geen null-waarde is toegestaan. > Wanneer een relatie wordt gewijzigd, wordt de gerelateerde > referentiële-sleuteleigenschap ingesteld op een null-waarde. Als ...
[ -0.6274622678756714, 0.17924337089061737, 0.36639603972435, -0.35570019483566284, 0.2398146539926529, -0.08388784527778625, 0.4626595973968506, -0.05481510981917381, -0.24620401859283447, -0.6483237743377686, -0.526953399181366, 0.8073458671569824, -0.2230130136013031, -0.03330016508698463...
public ActionResult Update(LandingPage update) { Campaign curr = Campaignrepository.FindById(update.CampaignId); PageRepository.Remove(update); curr.Pages.Remove(update); curr.Pages.Add(update);
[ -0.22299402952194214, -0.22845272719860077, 0.6407894492149353, -0.2102377861738205, -0.3841349482536316, 0.23082998394966125, 0.1936889886856079, -0.2582647502422333, -0.2062528133392334, -0.5618816614151001, -0.4014594256877899, 0.3296085298061371, -0.5488913059234619, -0.058372694998979...
Campaignrepository.SaveChanges(); return View("Edit", curr); } ``` But now it says "The Object can not be removed because it's not found in the ObjectManager". --- **Update 2** Still "The Object can not be removed because it's not found in the ObjectManager". ``` //A campaign has Pages prop...
[ 0.11707565188407898, -0.18693424761295319, 0.7305467128753662, -0.14355406165122986, -0.27160125970840454, 0.0023106387816369534, 0.1489306092262268, -0.3461301326751709, -0.3826887011528015, -0.6814064383506775, -0.21044541895389557, 0.4470985233783722, -0.4826502799987793, 0.021162554621...
//Get the campaign it's about Campaign curr = Campaignrepository.FindById(update.CampaignId); //Set the current Page his foreign key values to null curr.GetLanding().Campaign = null; curr.GetLanding().CampaignId = 0; //Remove the (current) page from the repository/context PageRepository.Remove(u...
[ 0.11218345910310745, -0.09717724472284317, 0.7666693329811096, -0.02986993081867695, -0.19559040665626526, 0.22962228953838348, 0.2461603879928589, -0.2816297709941864, -0.09029868990182877, -0.5889476537704468, -0.2823123633861542, 0.3676643669605255, -0.5953208804130554, 0.13134068250656...
PageRepository.SaveChanges(); return View("Edit", curr); } ``` This is a common point of confusion with the existential operator: Sometimes ``` x? ``` compiles to ``` typeof test !== "undefined" && test !== null ``` and other times it just compiles to ``` x != null ``` *The two are equivalent,* ...
[ -0.22819021344184875, 0.21112556755542755, 0.3816942870616913, 0.007731418590992689, -0.2644517123699188, -0.10043749213218689, 0.43252289295196533, -0.29285115003585815, -0.029133308678865433, -0.5772415399551392, -0.31907060742378235, 0.5554437041282654, -0.5696706175804138, 0.0044024731...
may not have been defined at all, in which case doing an equality test would trigger `ReferenceError: x is not defined`. In your particular case, `test.test` may have the value `undefined`, but you can't get a `ReferenceError` by referring to an undefined property on an existing object, so the compiler opts for the sh...
[ 0.4300224781036377, 0.008071692660450935, -0.216295525431633, 0.16864661872386932, -0.14201094210147858, -0.16916725039482117, 0.29223716259002686, -0.10200712084770203, 0.003249922301620245, -0.2711430788040161, -0.32470130920410156, 0.24394972622394562, -0.22827181220054626, 0.1915061026...
Since it is a textarea , I tried cols="50" in html attribute but it does not work. Also , I found the answer from the previous question . He said I can do this by adding. `CKEDITOR.instances.myinstance.resize(1000, 900);` However , the size still has not changed. Here is the code I attempted, thank you. **Updated*...
[ -0.031275950372219086, -0.006308838725090027, 0.7939426302909851, -0.12631037831306458, -0.07482939958572388, 0.316072016954422, 0.05717980116605759, -0.8275895714759827, -0.08126980811357498, -0.6444851160049438, -0.06832412630319595, 0.4821925163269043, -0.04233064875006676, -0.091743759...
<p><br /> <div id="editor"> <textarea id="editor1" name="editor1"> </div> <? if (isset($_GET['file'])) {$filepath=$_GET['file']; require_once("../template/".$filepath);}?> </textarea> </p>
[ -0.29282379150390625, -0.294473797082901, 0.5850219130516052, -0.25327467918395996, -0.05777149274945259, 0.28588128089904785, -0.022722775116562843, -0.6548435091972351, -0.04004085063934326, -0.6144977807998657, -0.5110481381416321, 0.5580295920372009, -0.43131062388420105, -0.3761009275...
</br> File Name </br> <b>(Naming Without .html e.g. MyTemplate1) :</b> </br> <input id="tname" name="tname" class="required" /> <input type="submit" /> </p> </form> </body> </html> ``` try following To achieve this, use the [resize](http://docs...
[ 0.24638132750988007, 0.14373020827770233, 0.5621379613876343, 0.08004926890134811, -0.3897005021572113, 0.3945018947124481, -0.41077643632888794, -0.6015668511390686, -0.3984728455543518, -0.6990683078765869, 0.01973060704767704, 0.533547043800354, 0.437013179063797, 0.08927712589502335, ...
of the editor interface, assigning the window a width and height value in pixels or CSS-accepted units. ``` // Set editor width to 100% and height to 350px. editor.resize( '100%', '350' ) ``` While setting the height value, use the isContentHeight parameter to decide whether the value applies to the whole editor int...
[ -0.0182532649487257, 0.2706878185272217, 0.8929749131202698, -0.14103379845619202, -0.35186469554901123, 0.2245645821094513, -0.029098697006702423, -0.28281643986701965, 0.012002285569906235, -0.7868872284889221, -0.223835751414299, 0.4482724666595459, -0.20801497995853424, -0.146220743656...
I'm looking to calculate the highest basket in my set of data but I can't get my head around how I should do it. I have data like: ``` OrderID | CustomerID | BasketID | ProductID | Price 1 | 1 | 1 | 221 | 10 2 | 1 | 1 | 431 | 123 3 | 1 | 2 | 761 | 44 4 | 2 | 3 | 12 | 54 5 | 2 | 3 | 102 | 78 6 | 3 | 4 | 111 | 98 7 | ...
[ -0.10059228539466858, -0.009205209091305733, 0.4526098370552063, -0.09293024986982346, -0.055053431540727615, 0.6309608817100525, -0.033351749181747437, -0.12088954448699951, -0.29458072781562805, -0.505872905254364, 0.3881588280200958, 0.23110340535640717, -0.04257422313094139, 0.15851269...
4 | 6 | 32 | 47 10 | 4 | 6 | 118 | 544 ``` Sorry if it seems quite messy. But I can easily get the SUM with an obvious ``` SELECT SUM([Price]), BasketID, CustomerID FROM table GROUP BY BasketID, CustomerID ``` But how can I filter the list for only the highest priced Basket ID for that CustomerID Thanks ``` SELE...
[ -0.2460988163948059, -0.18159735202789307, 0.4170234799385071, -0.13943076133728027, -0.06474162638187408, 0.585092306137085, -0.3538627326488495, -0.3588281571865082, -0.32921600341796875, -0.7053794860839844, -0.1684177815914154, 0.19770388305187225, -0.1344360113143921, 0.26685374975204...
BasketID, CustomerID FROM Order a GROUP BY BasketID,
[ 0.04984302446246147, -0.17880748212337494, 0.04495784267783165, -0.2697291672229767, -0.27540335059165955, 0.5141088366508484, 0.025064537301659584, 0.38631823658943176, -0.38610711693763733, -0.6065980195999146, -0.16696703433990479, 0.08664385229349136, -0.24157841503620148, 0.2248034477...
CustomerID ) a ) b WHERE RNK = 1 ``` I managed to conjure something up that worked.
[ 0.29990583658218384, 0.10607486218214035, 0.5856074094772339, -0.34963005781173706, 0.1975524127483368, 0.26044130325317383, 0.13607901334762573, 0.05173453688621521, 0.21402089297771454, -0.2733089327812195, 0.04852413758635521, 0.7850092053413391, -0.2927985191345215, 0.01775608584284782...
I installed XCode 4.3 from App Store. When i run the application the xcode version is showing 4.1. Present my mac version is Mac OS X Lion 10.7.3. Can any tell me the process how to load xcode 4.3. Thanks in advance. Just install it from LaunchPad.
[ 0.5718626379966736, 0.5056598782539368, 0.4320107400417328, -0.3683486580848694, -0.22965826094150543, -0.119157575070858, 0.5098435282707214, 0.2565460801124573, -0.06574612110853195, -0.7363620400428772, -0.12374778091907501, 0.5585048794746399, -0.4686780273914337, -0.07573453336954117,...
I simply cannot find how to do this. so, I have a String that will be something like this: ``` do this then do that then more of this ``` and I need to turn this into an array of strings. where every new line is needs to be a separate entry in the array. I need this done so I can process every line or command separa...
[ 0.3975774645805359, 0.257035493850708, 0.17290489375591278, -0.1381182074546814, 0.03812319412827492, -0.02470548078417778, 0.13226835429668427, -0.32950061559677124, -0.12753327190876007, -0.685575544834137, 0.09434200823307037, 0.36854133009910583, -0.3829835057258606, 0.2074816226959228...
to become an array. thanks in advance! ``` String s = "do this\nthen do that\nthen more of this"; String[] split = s.split("\n"); ```
[ 0.2010570764541626, -0.12534619867801666, 0.28216391801834106, -0.19495810568332672, 0.08228456974029541, -0.2550234794616699, 0.4475637376308441, -0.4732149839401245, -0.27854540944099426, -0.49817168712615967, -0.4741630256175995, 0.4843708872795105, -0.36670929193496704, -0.015640003606...
i have a table with columns ID,SUBJECT,BRANCH i have select the rows which satisfies the follwing conditions ``` id=rollno branch=cse subject=any subject db.query(DATABASE_TABLE, new String[] { ID,SUBJECT,BRANCH}, where clause, null, null, null, null); ``` ...
[ 0.07404082268476486, 0.34206870198249817, 0.40828844904899597, -0.10328034311532974, 0.02907952480018139, 0.2784227132797241, 0.1669420301914215, -0.43802669644355774, 0.011550561524927616, -0.6727316975593567, -0.0703253522515297, 0.19228105247020721, -0.3699376881122589, 0.20850470662117...
seperated by the same.. here is an example ``` String addrWhere = ContactsContract.Data.CONTACT_ID+" = ? AND "+ContactsContract.Data.MIMETYPE+" = ?"; //this is where clause and below is corresponding selection args.. String[] addrWhereParams = new String[]{data.getContac_ID(), ContactsContract.Com...
[ -0.19058309495449066, -0.07143175601959229, 0.36652809381484985, 0.01900831237435341, -0.197404146194458, 0.15601091086864471, 0.2203787863254547, -0.3907758295536041, 0.042407043278217316, -0.3050195276737213, -0.07057157158851624, 0.662570059299469, -0.36672136187553406, 0.02848399244248...
I'm trying to return the result of a entity framework query into my own dto class, at the same time as mapping my enum TradeType. I'm getting the following error **The specified value is not an instance of type 'Edm.Int32' Parameter name: value** Any idea how to fix or a workaround? Thanks ``` public IEnumerable<T...
[ 0.34848183393478394, -0.2027430683374405, 0.6557126045227051, 0.018818246200680733, 0.2786944508552551, -0.008712152019143105, 0.0884534940123558, -0.2670937478542328, -0.13138699531555176, -0.5103337168693542, 0.028695954009890556, 0.7936622500419617, 0.03777603805065155, 0.40608212351799...
Volume = (long) (p.Volume ?? 100), TradeType = (p.PriceTypeCode.Equals("O") ? TradeType.Seller : TradeType.Bidder), Price = p.Price1,
[ -0.21877309679985046, -0.06965130567550659, 0.6613588929176331, 0.16943949460983276, -0.09922470152378082, 0.5912212133407593, -0.31682485342025757, -0.4925127923488617, -0.044922612607479095, -0.2670218348503113, -0.5229436755180359, 0.6514506936073303, 0.12962646782398224, 0.466848671436...
TenorStartDate = p.Period.PeriodStartDate.Value, TenorEndDate = p.Period.PeriodStartDate.Value, TradeId = p.ID
[ -0.1105564683675766, -0.25856253504753113, 0.44690996408462524, -0.19377125799655914, -0.07530461996793747, 0.3769078254699707, 0.336772084236145, -0.10147468000650406, -0.20484554767608643, 0.4242922365665436, -0.44463521242141724, 0.7113857865333557, 0.25324735045433044, -0.0950538292527...
}).ToList(); } public class Trade { public long Volume { get; set; } public TradeType TradeType { get; set; } public double Price { get; set; } public DateTime TenorStartDate { get; set; } public DateTime TenorEndDate { get; set; } public Guid TradeId { get; set; } } ``` Enums in proje...
[ 0.42972642183303833, -0.5372060537338257, 0.6344058513641357, -0.18266203999519348, 0.21008506417274475, 0.027004877105355263, -0.0681915208697319, -0.2771928906440735, -0.04092670977115631, -0.19444164633750916, -0.29272618889808655, 1.049450397491455, -0.11109159141778946, 0.290044009685...
p.Period.PeriodYear <= DateTime.Now.Year + 1 && p.Route.RouteCode.Equals(routeName)).ToList() // ToList ! .Select(p => new Trade ... ``` the projection is done by regular linq-to-objects, which is a routine job. --- **EDIT** As a late afterthought I'd like to add that just a dumb `ToList()` can be detrimen...
[ -0.06559979915618896, 0.07014822214841843, 0.6771979928016663, -0.0802231952548027, 0.11017481237649918, 0.013293644413352013, -0.06995458155870438, -0.146233931183815, -0.50450599193573, -0.6430044770240784, -0.2420443743467331, 0.19998013973236084, -0.10745793581008911, 0.040751036256551...
project to the final type: ``` _entities.Price.Where(p => p.StatusCode.Equals("A") && p.Period.PeriodYear <= DateTime.Now.Year + 1 && p.Route.RouteCode.Equals(routeName)) .Select(p => new { Volume = (long) (p.Volume ?? 100), PriceTypeCode = p.PriceTypeC...
[ 0.15614056587219238, -0.2333405613899231, 0.6553055047988892, -0.06487252563238144, 0.2617391347885132, 0.21538199484348297, -0.024052094668149948, -0.1572410613298416, -0.04297947883605957, -0.5573899149894714, -0.2648150622844696, 0.4674733281135559, 0.30693867802619934, 0.50153672695159...
Price = p.Price1, TenorStartDate = p.Period.PeriodStartDate.Value, TenorEndDate = p.Period.PeriodStartDate.Value, TradeId = p.ID }) .AsEnumerable() .Select(x => new Trade
[ 0.005046844948083162, -0.5464271903038025, 0.46043503284454346, -0.1706230342388153, 0.129648819565773, 0.5007625818252563, -0.19866013526916504, -0.27298614382743835, -0.20338386297225952, -0.22756324708461761, -0.4243418574333191, 0.9810253381729126, -0.027028130367398262, 0.570890843868...
{ Volume = x.Volume, TradeType = (x.PriceTypeCode.Equals("O") ? TradeType.Seller : TradeType.Bidder), Price = x.Price1, TenorStartDate =
[ 0.07987663149833679, -0.15254639089107513, 0.6367913484573364, -0.03695545718073845, -0.043416041880846024, 0.5044715404510498, -0.07140568643808365, -0.3387494683265686, -0.08699668943881989, -0.2239242047071457, -0.3986123204231262, 1.188948154449463, 0.031222719699144363, 0.505106389522...
x.TenorStartDate, TenorEndDate = x.TenorEndDate, TradeId = x.ID }). ```
[ 0.17933650314807892, -0.23034870624542236, 0.4545018672943115, -0.39536726474761963, -0.05329660326242447, 0.1313065141439438, 0.44856056571006775, -0.23759958148002625, 0.2911612391471863, -0.004796009510755539, -0.30441904067993164, 0.926142692565918, -0.31377696990966797, -0.14291884005...
I have a `vector < vector < Point> > X` and want to copy all the elements in it into a `vector < Point > Y` (and in the same order if is possible) I tried something like (in a for cycle): ``` Y.push_back(i) = X.at(i).at(i); ``` but obviously it doesn't work... I also find this (on stackoverflow) but it doesn't work...
[ -0.2795926630496979, -0.18307925760746002, 0.5176685452461243, -0.26462799310684204, -0.06470159441232681, 0.10462944954633713, 0.05668098106980324, -0.4297361969947815, -0.24668434262275696, -0.6894899606704712, -0.0594397708773613, 0.6780864000320435, -0.5815301537513733, 0.0620283521711...