text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'm trying to make a Django function for JSON serializing something and returning it in an `HttpResponse` object. ``` def json_response(something): data = serializers.serialize("json", something) return HttpResponse(data) ``` I'm using it like this: ``` return json_response({ howdy : True }) ``` But I get...
[ 0.18252339959144592, 0.062452640384435654, 0.10100261121988297, -0.18247699737548828, -0.3906193971633911, -0.26463907957077026, 0.425302654504776, 0.06042667105793953, -0.23763465881347656, -0.5382378697395325, -0.03343653306365013, 0.6731271147727966, -0.6713229417800903, -0.037420149892...
have it installed already. ``` import json def json_response(something): return HttpResponse(json.dumps(something)) ``` I'd suggest sending it back with an application/javascript Content-Type header (you could also use application/json but that will prevent you from debugging in your browser): ``` import json ...
[ 0.3675824999809265, -0.1342206597328186, 0.35379236936569214, -0.15863555669784546, 0.07052724063396454, -0.38470402359962463, 0.33178743720054626, -0.03695983439683914, -0.12435491383075714, -0.7078137397766113, -0.5825233459472656, 0.6125129461288452, -0.43978604674339294, 0.006781588774...
I have a text in this format: > term: 156:59 datainput I want to remove the ":" between the number and then replace it with something else so the text can become: > term: 156-59 datainput How can I do this in VB.NET? In VB.NET (credit Jonathan): ``` Dim text As String = "term: 156:59 datainput" Dim fixedT...
[ 0.3366992175579071, -0.07053517550230026, 0.5591839551925659, -0.034996822476387024, 0.005706917494535446, -0.04692195728421211, 0.19020989537239075, -0.28460681438446045, -0.14465942978858948, -0.6519741415977478, -0.07647095620632172, 0.6959116458892822, -0.2311544418334961, 0.1416101306...
I have the following algorithm implemented in Java which uses TCP/IP: ``` -Client request a file -Server checks if the file exists - if do: send contents of the file to the client - if not: send "file not found" msg to the client ``` Now I`m having trouble implementing that using UDP Datapackets. Here is my code...
[ 0.053888216614723206, 0.21746115386486053, 0.5647947192192078, -0.29210206866264343, 0.19650137424468994, -0.07347923517227173, 0.31885865330696106, -0.35610273480415344, 0.07022795081138611, -0.8258123993873596, -0.14000803232192993, 0.718345582485199, -0.5678747892379761, 0.3735268414020...
} public static void main(String[] args) throws IOException { TCPClient.exibirCabecalho(); Socket echoSocket = null; PrintWriter out = null; BufferedReader in = null; if (args.length != 1){ System.out.println("O Programa deve ser chamado pelo nome + nome do se...
[ -0.006903216242790222, -0.003660892602056265, 0.27182331681251526, -0.1993122398853302, 0.43965497612953186, 0.3100694417953491, 0.5392035245895386, -0.1263858675956726, 0.08643882721662521, -0.0753936693072319, -0.2174006849527359, 0.8134816288948059, -0.4285505414009094, 0.36371248960494...
java TCPClient localhost"); System.exit(1); } System.out.println("Conectando ao servidor..."); try { echoSocket = new Socket( args[0] , CommonKeys.PORTA_SERVIDOR); out = new PrintWriter(echoSocket.getOutputStream(), true); in = new BufferedReader(...
[ -0.3586816191673279, -0.2792203724384308, 0.5822940468788147, -0.3721257150173187, 0.4040432572364807, 0.2017655223608017, 0.5406109690666199, -0.3309670388698578, 0.007231914438307285, -0.48009830713272095, -0.1781483143568039, 0.5490961670875549, -0.6214861273765564, 0.07486002892255783,...
.getInputStream())); } catch (UnknownHostException e) { System.err.println("Host não encontrado (" + args[0] + ")"); System.exit(1); } catch (IOException e) { System.err.println("Erro ao inicializar I/O para conexao"); System.exit(1);
[ -0.2505686581134796, -0.3023653030395508, 0.5663907527923584, -0.03112471103668213, 0.3112460970878601, 0.14882171154022217, 0.3174933195114136, -0.07599727064371109, 0.04457782953977585, -0.4131765365600586, -0.2407737523317337, 0.5550082921981812, -0.5631375908851624, 0.21800847351551056...
} System.out.println("Conectado, digite 'sair' sem as aspas para finalizar"); BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); String userInput; while ((userInput = stdIn.readLine()) != null) { out.println(userInput); String inputLin...
[ -0.5327185392379761, -0.35577836632728577, 0.5928484201431274, -0.3483756482601166, 0.16393494606018066, 0.5934121012687683, 0.0702577754855156, 0.03266097605228424, -0.19006194174289703, -0.5447405576705933, -0.36534813046455383, 0.3661520481109619, -0.41879749298095703, 0.133064419031143...
System.out.println("Servidor terminou a conexão."); System.out.println("Saindo..."); break; } System.out.println("Servidor: " + inputLine.replace("\\n", "\n")); } out.close();
[ -0.5774035453796387, -0.15156212449073792, 0.6732662320137024, -0.43947237730026245, 0.2024027556180954, 0.02746216021478176, 0.1507311910390854, -0.15334178507328033, -0.08131160587072372, -0.41805145144462585, -0.624595582485199, 0.5017163157463074, -0.4653005003929138, 0.256355673074722...
in.close(); stdIn.close(); echoSocket.close(); } } ``` --- ### SERVER: ``` package br.com.redes.server; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java...
[ -0.07496615499258041, 0.1848415583372116, 0.6893226504325867, -0.2247624546289444, 0.017147917300462723, 0.28281939029693604, 0.15248039364814758, -0.29287272691726685, -0.07843120396137238, -0.42606329917907715, -0.28136691451072693, 0.6965044736862183, -0.7116606831550598, 0.141437545418...
= null; try { serverSocket = new ServerSocket( CommonKeys.PORTA_SERVIDOR ); } catch (IOException e) { System.err.println("Erro ao iniciar servidor na porta: " + CommonKeys.PORTA_SERVIDOR ); System.exit(1); } System.out.println("Iniciando servidor na p...
[ -0.4631609618663788, -0.2300303429365158, 0.5255681276321411, -0.36379149556159973, 0.22273875772953033, 0.3806191086769104, 0.2407519668340683, -0.20808126032352448, -0.11708048731088638, -0.438962459564209, -0.30519378185272217, 0.5468319654464722, -0.3973141610622406, 0.1458607316017151...
System.out.println("Aguardando cliente..."); Socket clientSocket = null; try { clientSocket = serverSocket.accept(); } catch (IOException e) { System.err.println("Erro ao receber conexoes."); System.exit(1); } PrintWriter out = new PrintWriter...
[ -0.42503926157951355, -0.27223214507102966, 0.6123334765434265, -0.33108940720558167, 0.28015148639678955, 0.46281951665878296, 0.3743802607059479, -0.20873582363128662, -0.10654041171073914, -0.508541464805603, -0.27607014775276184, 0.5682457685470581, -0.4254975914955139, 0.2085609585046...
BufferedReader in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); String inputLine, outputLine; System.out.println("Cliente conectado, aguardando caminhos pra leitura..."); while ((inputLine = in.readLine()) != null) { if (inputLine.equalsIgnoreCase("sa...
[ -0.2219812124967575, -0.27652159333229065, 0.8624801635742188, -0.22325721383094788, 0.24751241505146027, 0.23218178749084473, 0.394927442073822, -0.2114427089691162, 0.11564787477254868, -0.4829760491847992, -0.4324919581413269, 0.6350511908531189, -0.523804247379303, 0.08638818562030792,...
} outputLine = processar(inputLine); out.println(outputLine); } out.close(); in.close(); clientSocket.close(); serverSocket.close(); } private static String processar(String inputLine) { final String ARQUIVO_NAO_ENCONTRADO =
[ -0.3109532594680786, -0.16569863259792328, 0.6200214624404907, -0.5563573837280273, 0.229673370718956, 0.5831823348999023, 0.12749937176704407, -0.2447596788406372, -0.1182982325553894, -0.3473919630050659, -0.4282262623310089, 0.4275774359703064, -0.49613407254219055, 0.4532189965248108, ...
"arquivo não encontrado."; final String ARQUIVO_IO = "erro ao ler arquivo."; System.out.println("Procurando arquivo: " + inputLine); File f = new File(inputLine); try { BufferedReader input = new BufferedReader(new FileReader(f)); String linha = null; ...
[ -0.4468463659286499, -0.26603949069976807, 0.8079199194908142, -0.3447863459587097, 0.32399335503578186, 0.5535317659378052, 0.192604199051857, -0.25816261768341064, -0.1323830485343933, -0.23259706795215607, -0.5795387029647827, 0.727748453617096, -0.43060439825057983, 0.12652064859867096...
retorno.append("\\n"); retorno.append("Arquivo encontrado, lendo conteudo: " + inputLine + "\\n"); while (( linha = input.readLine()) != null){ retorno.append(linha + "\\n"); } retorno.append("fim da leitura do arquivo\\n");
[ -0.2870360314846039, -0.0553528293967247, 0.9028903245925903, -0.24166415631771088, 0.31969502568244934, 0.14555014669895172, -0.04638580232858658, -0.7256821990013123, -0.014823521487414837, 0.05867302790284157, -0.4763585329055786, 0.8702710866928101, -0.3667754828929901, -0.138911023736...
return retorno.toString(); } catch (FileNotFoundException e) { return ARQUIVO_NAO_ENCONTRADO; } catch (IOException e) { return ARQUIVO_IO; } } } ``` This certainly can be done using UDP datagrams. However, it is going to be a bit more difficult since UDP itself does ...
[ -0.017575474455952644, -0.3645069897174835, 0.35881343483924866, -0.20681048929691315, 0.07087456434965134, -0.14031082391738892, 0.25001439452171326, -0.4830276668071747, -0.22737249732017517, -0.3937733471393585, -0.31238603591918945, 0.6867994070053101, -0.3313627541065216, 0.1573750227...
packet delivery. Your application needs these features to deliver a file to the client. If you choose to use UDP, you will need to write extra code to accomplish this. Are you sure you really want to use UDP at all? If you choose TCP much like your example above, you won't need to worry about bytes getting there and ...
[ 0.34206119179725647, -0.3352821469306946, 0.25276368856430054, 0.04913762956857681, -0.26391053199768066, -0.2702876031398773, -0.12288094311952591, 0.005841582547873259, -0.5227426290512085, -1.0631135702133179, -0.028578612953424454, 0.42578062415122986, -0.46624505519866943, 0.051028981...
I have a form in my project that is showing up as a class in Solution Explorer. This is causing a problem since I can't get to the designer. Any ideas on how to fix this? Try seeing if there are any hidden files by using the the 'Show All Files' button. Sounds like your project file might not have all of the files adde...
[ 0.7090811133384705, -0.10707371681928635, -0.030725114047527313, 0.34409502148628235, 0.04784156382083893, -0.40490958094596863, 0.4804876148700714, 0.5173229575157166, -0.15269149839878082, -0.7773039937019348, 0.23019500076770782, 0.227412149310112, -0.17497020959854126, 0.37754720449447...
Is there any way to undelete a SQL server database and stored procedures? ### Edit: No I don't have a backup. That is the reason I need help Restore from backup. You do have a backup, right? Edit: I'm assuming you probably did a right-click, "Delete" from SQL Management Studio? If so, that actually does a "drop" of...
[ 0.2621665894985199, 0.17540055513381958, 0.20959332585334778, 0.39484232664108276, 0.2361583113670349, -0.3127221167087555, 0.3969809412956238, 0.1046956405043602, -0.3900986313819885, -0.3401762545108795, -0.12906086444854736, 0.8821119070053101, -0.16765838861465454, 0.017708750441670418...
simply attach them.
[ 0.760836660861969, 0.3121300935745239, 0.0461038239300251, 0.42098450660705566, 0.017441360279917717, -0.19537124037742615, -0.3180086612701416, -0.28430426120758057, 0.10992339998483658, -0.5173288583755493, -0.4699370861053467, 0.3089355230331421, -0.14063672721385956, 0.0421878769993782...
I have a windows forms client that consumes an ASP.net web service. It's my understanding that when an exception is thrown by the web service it will be converted to a SoapException in the .net client software. Well, I am catching the SoapException, but when I display the message on the client end in a messagebox, it...
[ 0.26474544405937195, 0.37202778458595276, 0.2725810110569, -0.23697224259376526, -0.19486096501350403, -0.08214272558689117, 0.28217560052871704, -0.12390958517789841, -0.05038100853562355, -0.8399850130081177, -0.01644783653318882, 0.36496350169181824, -0.2879582941532135, 0.2968968451023...
signUps) in c:\Documents and Settings\rdoverby\My Documents\Visual Studio 2008\WebSites\www.gtcc.edu\App_Code\webservices\Transportation.cs:line 50 ``` Whereas, all I really want to show is: ``` Invalid username or password. ``` How can I extract ONLY the original exception's message from the SoapException. I have p...
[ 0.023343592882156372, 0.5622340440750122, 0.533311128616333, -0.16113439202308655, -0.14514166116714478, 0.051964279264211655, 0.5166555047035217, -0.09366858005523682, -0.2471340447664261, -0.6421484351158142, -0.08220093697309494, 0.2879246771335602, -0.12800297141075134, 0.1003604233264...
Using php's DOMDocument->LoadHTMLFile('test.html'); keeps on returning an error to me, reporting for an error in the content at line 36. Deleting character after character, it turns out it's an apparently empty space that was the culprit. Copying/pasting that sentence in another editor (Editra), showed a strange RS cha...
[ 0.17704598605632782, 0.0964558869600296, 0.34773001074790955, 0.20469294488430023, -0.25915423035621643, -0.18017630279064178, 0.30237939953804016, -0.23580676317214966, -0.29623281955718994, -0.3886096775531769, -0.17415156960487366, -0.06615053117275238, -0.28631591796875, 0.403603821992...
divide groups made up of items of the level beneath it. > > > SEQ: `^^` - Dec: 30 - Hex: 1E - Acronym: RS What you can do is use [`strtr()`](http://is.php.net/manual/en/function.strtr.php) to strip away non visible characters. [An example by Joel Degan on PHP.net](http://is.php.net/manual/en/function.strtr.php#...
[ -0.10393358021974564, 0.08007001131772995, -0.03553573042154312, -0.052501238882541656, 0.08679105341434479, 0.04658912122249603, 0.30507245659828186, -0.10909494012594223, -0.4924936294555664, -0.6624501943588257, -0.48972320556640625, -0.08353504538536072, -0.2008577585220337, -0.2341962...
I need to build up a string using XSLT and separate each string with a comma but not include a comma after the last string. In my example below I will have a trailing comma if I have Distribution node and not a Note node for instance. I don't know of anyway to build up a string as a variable and then truncate the last ...
[ -0.12118304520845413, -0.1151493638753891, 0.4806627631187439, -0.07357549667358398, 0.09931140393018723, -0.08802469819784164, -0.06723978370428085, -0.27501654624938965, -0.18970923125743866, -0.6370455622673035, 0.11826899647712708, 0.14060497283935547, -0.44817307591438293, 0.459663659...
<xsl:value-of select="Distribution"/>, </xsl:if> <xsl:if test="Note != ''"> <xsl:value-of select="Note"/> </xsl:if> ``` [Man there's gotta be a better way to enter into this question text box :( ] **This is very easy to accomplish with XSLT** (*No need to capture the results in a variable, or to use special named t...
[ 0.04764173924922943, -0.1630268394947052, 0.24810826778411865, 0.1024298444390297, -0.2558934688568115, -0.2939402759075165, 0.36565834283828735, -0.8071532845497131, -0.1552884876728058, -0.7270244359970093, -0.1751091629266739, 0.512585461139679, -0.3451625108718872, 0.011166754178702831...
<xsl:value-of select="."/> <xsl:if test="not(position() = last())">,</xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> ``` when this transformation is applied on the following XML document: ``` <root> <record> <Locality>Locality</Locality> <CollectorAndNumber>CollectorA...
[ -0.02560211904346943, -0.28924185037612915, 0.10555153340101242, 0.0688517689704895, 0.1613457053899765, 0.05261962115764618, -0.223152756690979, -0.7883071899414062, -0.18353496491909027, -0.5640283226966858, -0.3750312030315399, 0.16334854066371918, -0.09921026229858398, 0.26895242929458...
should be produced not in document order** (something not required in the question, but raised by Tomalak), **it is still quite easy and elegant to achieve this:** ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:param name="porderedNames" ...
[ 0.07460734993219376, -0.09941209852695465, 0.4125065207481384, 0.026496436446905136, -0.018855011090636253, 0.0052247256971895695, -0.1424625664949417, -0.7639143466949463, -0.3585444986820221, -0.5243053436279297, -0.3559863269329071, 0.3819611072540283, -0.24665021896362305, 0.2582099735...
substring-before($porderedNames, concat(' ',name(), ' ') )
[ -0.41376563906669617, -0.10029144585132599, 0.438510924577713, 0.05908432602882385, 0.01941939815878868, 0.18804298341274261, 0.16214443743228912, -0.038075223565101624, -0.0382269024848938, -0.2765463590621948, -0.34303218126296997, 0.3788418769836426, -0.2980033755302429, 0.3995885252952...
)"/> <xsl:value-of select="."/> <xsl:if test="not(position() = last())">,</xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> ``` *Here the names of the wanted elements and their wanted order are provided in the string parameter `$porderedNames`, which contains a space-sepa...
[ -0.13679978251457214, -0.2710140347480774, 0.34395018219947815, -0.1837974637746811, 0.36597585678100586, 0.2259075790643692, -0.1026485338807106, -0.6020620465278625, -0.024895355105400085, -0.5050353407859802, -0.5082293748855591, 0.22029195725917816, -0.1502789556980133, 0.0010345731861...
on the same XML document, the wanted result is produced**: ``` CollectorAndNumber,Locality,Distribution,Institution ``` --- **II. XSLT 2.0**: In XSLT this task is even simpler (*again, no special function is necessary*): ``` <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:ou...
[ -0.04389585182070732, -0.2735040485858917, 0.6479981541633606, -0.02772662416100502, -0.03202912583947182, -0.012004884891211987, -0.07535338401794434, -0.7445179224014282, 0.06002279371023178, -0.7868792414665222, -0.5331513285636902, 0.3350680470466614, -0.2858676612377167, 0.07279880344...
the XSLT 1.0 solution), which by definition contains items in any desired (specified) order.
[ -0.30276918411254883, -0.14396095275878906, 0.5346217155456543, 0.22204013168811798, 0.10270226001739502, -0.09258304536342621, 0.06974485516548157, -0.24666300415992737, 0.007185732014477253, -0.42019158601760864, -0.7933110594749451, 0.36648645997047424, -0.7296571731567383, -0.070879518...
I am writing an application that needs to be installed on a large number of desktops and also needs to update itself. We are looking at WIX for creating the installation. I have used ClickOnce and it is not a good solution for this install. WIX seems to fit, but there is no good process for auto update that I have foun...
[ 0.7106492519378662, 0.1545756459236145, 0.44848084449768066, 0.11096164584159851, -0.07081187516450882, -0.09994354844093323, 0.2462943196296692, 0.5189797878265381, -0.08043234050273895, -1.0594021081924438, 0.28052157163619995, 0.6335058808326721, -0.15093883872032166, 0.0275980327278375...
you're looking for here. There are bits and pieces in it that work. You might be able to dissect the code and use it yourself without all the extra "UI + build integration". Most of the bugs are in the higher levels. At the root, the RSS update and executable bootstrapper work fine.
[ 0.46013444662094116, -0.008223745040595531, 0.029507067054510117, 0.24208025634288788, 0.08794393390417099, -0.4650297164916992, 0.36916255950927734, 0.22432926297187805, -0.21408644318580627, -0.6777857542037964, -0.0683489590883255, 0.7410450577735901, -0.3285003900527954, -0.19366919994...
I need to test whether the value of a form's `onsubmit` is a function. The format is typically `onsubmit="return valid();"`. Is there a way to tell if this is a function, and if it's callable? Using typeof just returns that it's a string, which doesn't help me much. **EDIT**: Of course, I understand that "return valid...
[ 0.33582058548927307, 0.18987613916397095, 0.3652631938457489, -0.09917933493852615, -0.09413965791463852, -0.28462693095207214, 0.26302850246429443, -0.2829534709453583, -0.011461056768894196, -0.4269484579563141, -0.2225893884897232, 0.49620145559310913, -0.3308849334716797, 0.32933357357...
submit_function && typeof( submit_function.replace(/return /,"") ) == 'function' ) { return eval(submit_function.replace(/return /,"")); } else { alert("onSubmit is not a function.\n\nIs the script included?"); return false; } } ); ``` **EDIT 2**: Here's the new code. It seems that I still hav...
[ 0.18018698692321777, -0.061076436191797256, 0.5311872363090515, -0.2398010641336441, -0.13787369430065155, 0.14591987431049347, 0.5265435576438904, -0.7111876606941223, 0.019951622933149338, -0.5030403733253479, -0.2561335265636444, 0.6215056777000427, -0.6425502300262451, 0.17239937186241...
} else { alert("onSubmit is not a function.\n\nIs the script included?"); return false; } } ); ``` Suggestions on possibly how to do this better? > I'm replacing a submit button with an > anchor link. Since calling > form.submit() does not activate > onsubmit's, I'm finding it, and > eval()ing...
[ 0.0303557850420475, -0.15386658906936646, 0.27080005407333374, -0.24740485846996307, 0.10140771418809891, -0.18798819184303284, 0.6056368947029114, -0.3339451551437378, 0.007434027269482613, -0.5957551002502441, -0.34519436955451965, 0.6417645812034607, -0.5656119585037231, -0.031721886247...
{ if (typeof f.onsubmit === 'function') { // onsubmit is executable, test the return value if (f.onsubmit()) { // onsubmit returns true, submit the form f.submit(); } } } </script> <form name="theForm" onsubmit="return onsubmitHandler();"> <a href="#" onclick=" ...
[ 0.2475784569978714, -0.03484716638922691, 0.7164282202720642, 0.008129806257784367, -0.06657315790653229, -0.007027607411146164, 0.2878129482269287, -0.6460054516792297, 0.32034730911254883, -0.45114436745643616, -0.44280076026916504, 0.5838685035705566, -0.13742724061012268, 0.21750891208...
work regardless of whether you assign the `onsubmit` HTML attribute or assign it in JavaScript: ``` document.forms['theForm'].onsubmit = onsubmitHandler; ```
[ 0.5306577682495117, 0.09976250678300858, 0.41424626111984253, -0.06938754767179489, 0.043113112449645996, -0.1407206952571869, 0.34564533829689026, -0.34697285294532776, -0.36586904525756836, -0.6891458630561829, -0.543341875076294, 0.4718201160430908, -0.3509143590927124, -0.2008185088634...
We have set up a logshipping scenairo on 2 Sql Server 2005 machines. The secondary database is in STANDBY mode. We want to use this secondary server for reporting purposes, as the report viewers will query this STANDBY database according to their given execute rights. So we need multiple users on this secondary server,...
[ 0.2587796747684479, 0.06200813129544258, 0.19497019052505493, 0.3340350389480591, -0.08745189756155014, -0.3084646463394165, 0.07974697649478912, -0.12784531712532043, -0.38527151942253113, -0.27159383893013, 0.1711788773536682, 0.41329899430274963, -0.3404218852519989, 0.3241184651851654,...
to use the Standby server for reporting purposes. And there is a way to create new users and give necessary sp execute rights to that user on the standby server. The simple solution is, to create a login on the primary server and Select its SID from master table. Then with "sp\_addlogin" create the same login with the ...
[ 0.34868374466896057, -0.05862302705645561, 0.8372321128845215, 0.20776976644992828, 0.10999422520399094, -0.17988283932209015, 0.11027062684297562, -0.47418540716171265, -0.6687784194946289, -0.6873959302902222, -0.0684150755405426, 0.3585933744907379, -0.3423738479614258, 0.04785568639636...
standby report viewer user can't access the primary server with the same credentials.
[ 0.3342074751853943, -0.11412833631038666, 0.49947184324264526, 0.11655334383249283, -0.6057695746421814, -0.313809335231781, 0.22254343330860138, -0.284980446100235, -0.186325803399086, -0.3980577886104584, -0.09195414185523987, 0.24508115649223328, -0.23637829720973969, 0.3725764453411102...
i'm trying to send/receive data over wifi to an iphone/ipodtouch app from a C# tcpip server. for this i used cocoaAsyncSocket from the google project. If i push a button and i send a request from ipod to server it returns the requested data(song title for example)..i want to know every second what song is playng...so f...
[ 0.017787331715226173, -0.01512782834470272, 0.5466437935829163, 0.009976309724152088, -0.13553094863891602, 0.15419110655784607, 0.486548513174057, -0.009351489134132862, -0.22472816705703735, -0.7658616900444031, 0.17484663426876068, 0.6583263874053955, 0.11090085655450821, 0.109787367284...
called anymore. The connection to the server is still active and the C# server still sends data.. what i want to do is the following thing: -> winamp plays a song -> C# server asks winamp what songs is he playing and sends the song title to my app. -> iphone app receives the data and displays it i don't know why the ...
[ 0.2827220857143402, 0.12215667217969894, 0.6609744429588318, 0.3276492953300476, 0.09828191995620728, -0.25113973021507263, 0.42419135570526123, 0.04724106192588806, -0.23277784883975983, -0.237459197640419, 0.05568293109536171, 0.9512417912483215, -0.22754934430122375, 0.2812519371509552,...
intervals i used the fallowing code(i don't know if is the best solution but it works for what i wanted): ``` - (void) readDataFromSocket { [socket readDataWithTimeout:-1 tag:0]; } - (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag { NSData *strData = [data subdataWithRange:...
[ 0.2580561935901642, -0.5671697854995728, 0.39621904492378235, 0.06911169737577438, 0.04168905317783356, -0.012301657348871231, 0.7413581013679504, -0.22299934923648834, -0.173563614487648, -0.5077557563781738, -0.04741445928812027, 0.7083748579025269, -0.10653508454561234, -0.1336982101202...
} else { Do something else } } } else { NSLog(@"Error converting received data into UTF-8 String"); } [socket readDataWithTimeout:-1 tag:0]; } ``` i call once in my application the readDataFromSocket method that calls
[ 0.018710853531956673, 0.01331466343253851, 0.24163515865802765, -0.18605704605579376, 0.17757417261600494, -0.28982964158058167, 0.4702971279621124, -0.06173890084028244, -0.012776372022926807, -0.5824080109596252, -0.2449452430009842, 0.7078625559806824, -0.31203246116638184, 0.1649000942...
the sockets [socket readDataWithTimeout:-1 tag:0] method. It should be called only once in the app because in the method - (void)onSocket:(AsyncSocket \*)sock didReadData:(NSData \*)data withTag:(long)tag method in the last line i call again the [socket readDataWithTimeout:-1 tag:0]; which tells the socket to listen on...
[ 0.4005769193172455, -0.17937493324279785, 0.41151443123817444, 0.09698022902011871, 0.12949340045452118, -0.11061855405569077, 0.7280607223510742, 0.12136486172676086, -0.15396422147750854, -0.6512632369995117, -0.21230709552764893, 1.0904226303100586, -0.2979687452316284, -0.0462704710662...
I am stuck figuring out a working SQL Query for the fallowing: I need to generate a Fire Register report (how many people are still inside the building) based on an Access database that records login/logout events along with some metadata. The Access DB looks like this: ``` +----+---------------------+---------+--...
[ 0.25264137983322144, 0.3561251759529114, 0.5506069660186768, -0.23362259566783905, -0.07118843495845795, -0.04436248168349266, 0.8271750211715698, -0.4221550226211548, -0.09500222653150558, -0.16297496855258942, -0.04666109010577202, 0.17671902477741241, -0.09121222048997879, -0.0158834382...
logout | 1 | Nick | | 3 | 2009-04-28 04:00:00 | login | 1 | Nick | | 4 | 2009-04-28 04:00:00 | logout | 1 | Nick | | 5 | 2009-04-28 04:00:00 | login | 1 | Nick | | 6 | 2009-04-28 07:00:00 | login | 1 | John | | 7 | 2009-04-28 07:30:00 | login
[ 0.09038698673248291, 0.2794707119464874, 0.6768779158592224, 0.10442093759775162, 0.1946425437927246, 0.23844504356384277, 0.2766387164592743, 0.18196149170398712, -0.604972243309021, -0.7950806021690369, -0.22505635023117065, 0.4395817816257477, -0.6116029620170593, -0.21229033172130585, ...
| 1 | Sue | | 8 | 2009-04-28 08:00:00 | logout | 1 | John | +----+---------------------+---------+---------+------+ ``` During the day there can be multiple login/logout actions. When administrator runs the report, it's only limited for current day and needs to list all users where the last known actio...
[ 0.23670798540115356, 0.23390834033489227, 0.7326928973197937, -0.17879706621170044, 0.21367613971233368, 0.05509987100958824, 0.843192994594574, -0.30775779485702515, -0.48311662673950195, -0.6545983552932739, -0.29047471284866333, 0.4737483859062195, -0.2866375148296356, -0.07833060622215...
T1.user FROM Some_Table T1 LEFT OUTER JOIN Some_Table T2 ON T2.user = T1.user AND T2.success = 1 AND T2.date > T1.date WHERE T1.success = 1 AND T1.action = 'login' AND T2.id IS NULL ``` This assumes that you only care about successful actions. Also, if a user has two actions on the ...
[ 0.0509641207754612, -0.20020465552806854, 0.41991448402404785, -0.34439006447792053, 0.08096865564584732, 0.07009944319725037, 0.2647843360900879, -0.09898923337459564, -0.2583564519882202, -0.5253533124923706, -0.1773294061422348, 0.392017662525177, -0.04551834613084793, 0.243503108620643...
I have form with user defined filters ( combobox with column names, combobox with filter types and textbox with value). How can I dynamicly add user defined filter into LINQ query? Typical query looks like: ``` var qProducts = from p in db.Products where p.IsArchived == false order by p.ProductName select p;...
[ 0.0405651293694973, -0.13482578098773956, 0.6026940941810608, -0.06344938278198242, -0.2904415726661682, -0.04581586271524429, 0.04929447919130325, -0.5391867160797119, -0.130854070186615, -0.5864569544792175, 0.14181911945343018, 0.36234796047210693, -0.42415300011634827, 0.13929238915443...
.Where( "IsArchived = {0}", archiveFilterValue ) .OrderBy( sortColumn + " " + sortDirection ); ```
[ -0.2184607833623886, -0.23778152465820312, 0.411913126707077, -0.09767866879701614, 0.3801153302192688, -0.1529662311077118, 0.36306464672088623, -0.13927488029003143, -0.22548741102218628, -0.6556582450866699, -0.3981103003025055, 0.13964051008224487, -0.5060360431671143, 0.13573186099529...
We have a desktop application that performs a pretty rigorous set of calculations in a background thread. Portions of this calculation are performed in an unmanaged library that we access through interop. What we are finding is that, when we kick off the calculation, the UI thread becomes unresponsive for the duration ...
[ 0.29228830337524414, -0.20212292671203613, 0.34061360359191895, 0.17403119802474976, 0.37423256039619446, -0.09767971932888031, 0.06663593649864197, -0.15954893827438354, -0.1707106977701187, -0.8419821262359619, -0.010162662714719772, 0.5175743699073792, -0.2666380703449249, -0.0840837582...
responsive. This has the side effect of slowing the calculation. Also, portions of the calculation performed by the unmanaged code can take up to 30 seconds to complete, and during this time the application is always unresponsive. The entire calculation can take anywhere from two to five minutes to complete. This lead...
[ 0.11430146545171738, -0.3588561415672302, 0.7221490144729614, 0.2045103758573532, -0.11605700850486755, 0.05056073144078255, 0.2992565631866455, -0.19416749477386475, -0.5464353561401367, -0.7656026482582092, 0.128823921084404, 0.8720443844795227, -0.29721567034721375, -0.19850431382656097...
is one preferred over the other? You could lower the priority of your background thread, so it will be preempted more by the OS. If you have some domain knowledge that leads you to want to control when it's preempted, you could go with Thread.Sleep(0) which surrender your timeslice if there's another thread waiting. A...
[ -0.07683372497558594, -0.3554111123085022, 0.5823407173156738, -0.0890229269862175, -0.0006745037971995771, -0.06604782491922379, 0.17460690438747406, -0.25974488258361816, -0.22044891119003296, -0.8333348035812378, -0.10672640800476074, 0.7608498334884644, -0.6399098038673401, 0.036556433...
In webforms, we would do somthing like this to set up a hander to generate a dyanmic image: ``` <img src="/barchart.aspx?width=1024&height=768&chartId=50" > ``` Then of course we would write code on the .aspx page to render the image using the parameters and write it back into the response. I am honestly not sure ...
[ 0.1886652112007141, -0.2827204465866089, 0.7320958375930786, -0.054387371987104416, -0.2563542127609253, 0.03774004429578781, 0.12235800921916962, -0.44821590185165405, -0.10548800975084305, -0.870486319065094, -0.23109179735183716, 0.5104079246520996, -0.3240671157836914, 0.08004713803529...
// ASP.NET MVC will map the request parameters to method arguments } } ``` To create a link: ``` Url.Action("BarChart", "ImageGenerator", new { width = 1024, height = 768, chartId = 50 }); ``` Will output: ``` /ImageGenerator/BarChart?width=1024&height=768&chartId=50 ```
[ -0.06945928186178207, -0.25586190819740295, 0.8571110963821411, -0.0800054669380188, -0.08855586498975754, 0.3087761402130127, 0.25119495391845703, -0.3297252953052521, -0.2957134544849396, -0.595626950263977, -0.535577118396759, 0.4374963641166687, -0.34724605083465576, -0.027493596076965...
In VB6, there used to be a Collection data type that would allow retrieval of an item in the collection by either its key or its ordinal. However, it wasn't strongly typed. Now, with VB.Net, I am looking for a suitable replacement that is strongly type and could be used with a generic collection. This is a simple ex...
[ 0.07842104882001877, -0.22414030134677887, 0.22542905807495117, -0.02245059236884117, -0.19636379182338715, -0.19480498135089874, 0.1969531923532486, -0.2978142201900482, -0.2757095992565155, -0.42429083585739136, -0.13330960273742676, 0.27479472756385803, -0.6540907025337219, 0.3835166394...
looking for. For large collections, this is not efficient. I have looked though the various Collection type classes and have found no suitable replacement. This is what I want to do, except for the looping that is done with the Item property. Rather than just saying "Use Hash tables" or something like that, if you ...
[ 0.08860812336206436, 0.10687629133462906, -0.03707832843065262, 0.16607831418514252, 0.18393786251544952, 0.13990271091461182, -0.018955625593662262, 0.05588352307677269, -0.3077901303768158, -0.542824923992157, -0.15289759635925293, 0.4449160695075989, -0.08420940488576889, 0.500963926315...
_Property1 = property1 End Sub Dim _KeyName As String Public Property KeyName() As String Get Return _KeyName End Get Set(ByVal value As String) _KeyName = value End Set End Property Public _Property1 As String
[ 0.025003621354699135, -0.009104110300540924, 0.5465326309204102, -0.022237129509449005, -0.05064767599105835, -0.3302198052406311, 0.14772064983844757, -0.44094377756118774, 0.022212786599993706, -0.06894189864397049, -0.6028578281402588, 0.5450148582458496, -0.09532434493303299, 0.6723998...
Public Property Property1() As String Get Return _Property1 End Get Set(ByVal value As String) _Property1 = value End Set End Property End Class Public Class Cars Inherits System.ComponentModel.BindingList(Of Car) Public Overloads ReadOnly Property...
[ -0.1368321031332016, 0.0365472175180912, 0.12664559483528137, 0.31362390518188477, -0.044927313923835754, 0.13672588765621185, 0.044777266681194305, -0.27637219429016113, -0.011888925917446613, -0.2888127863407135, -0.3828856647014618, 0.5924924612045288, -0.07856599986553192, 0.5826640129...
Get For Each CurrentCar As Car In Me.Items If CurrentCar.KeyName = key Then Return CurrentCar End If Next
[ -0.14236818253993988, -0.1596999168395996, 0.7402012944221497, 0.32416531443595886, -0.0055485013872385025, 0.5729712843894958, -0.18615935742855072, -0.19331605732440948, -0.26683151721954346, -0.22199156880378723, 0.14236319065093994, 0.508299708366394, 0.20981134474277496, 0.60423976182...
Return Nothing End Get End Property End Class ``` I believe you're looking for [`Dictionary<TKey, TValue>`](http://msdn.microsoft.com/en-us/library/xfhwa508.aspx). In fact, if you do want your own collection class that's strongly typed and isn't (itself) generic, if you change your parent class to `Dictio...
[ 0.039330318570137024, -0.08365041017532349, 0.31267938017845154, 0.2929234206676483, -0.015761567279696465, -0.1619151532649994, 0.0332355834543705, -0.057047486305236816, 0.037081409245729446, -0.36005735397338867, -0.40879809856414795, 0.40013864636421204, -0.025458384305238724, 0.337820...
or inheriting from `List<Car>` and using LINQ to query the list. You could then have... ``` Public Overloads ReadOnly Property Item(ByVal key As String) As Car Get Return (from c in Me where c.KeyName = key select c).SingleOrDefault() End Get End Property ```
[ 0.035481568425893784, 0.00542444409802556, 0.08472689986228943, 0.009796777740120888, -0.0628061592578888, -0.0029885442927479744, -0.044453978538513184, -0.40533655881881714, -0.1256132870912552, -0.14844903349876404, -0.22641077637672424, 0.725433886051178, -0.09645597636699677, 0.552531...
If I lost/have no access to the private key associated with a distribution certificate: 1. Can I just create a new one? 2. If I do, will it produce any problems during the submission process? 3. Will apps signed with the old certificate stop working? 4. Will I be able to update apps signed with the old certificate? Yo...
[ 0.6924835443496704, 0.09327014535665512, 0.29694584012031555, 0.1958463042974472, 0.35222673416137695, -0.060562439262866974, 0.4414452910423279, -0.16889970004558563, -0.3054852783679962, -0.4844169020652771, -0.2215600609779358, 0.6601767539978027, -0.38868722319602966, 0.403367996215820...
to release updates for existing apps.
[ 0.33820220828056335, 0.15301717817783356, 0.013590258546173573, 0.24025191366672516, 0.029523439705371857, -0.04529842734336853, 0.17111250758171082, 0.36102816462516785, 0.030758067965507507, -0.7008760571479797, -0.5467089414596558, 0.18460798263549805, -0.003329708008095622, -0.18643178...
I had a colleague check in code like this in C (syntax #1): ``` (*(*(*p_member).p_member).p_member).member ``` When I asked him why he didn't use -> (syntax #2): ``` p_member->p_member->p_member->member ``` he got really defensive stating that syntax #2 is more complicated than #1...I ended up changing his code b...
[ 0.15445686876773834, 0.30865928530693054, -0.12264155596494675, -0.062429577112197876, -0.3045772612094879, -0.2216905653476715, 0.37314724922180176, -0.07739240676164627, -0.34079840779304504, -0.5316945314407349, -0.29027408361434937, 0.33489808440208435, -0.42757025361061096, 0.08742623...
code that has to go indirect 3 times too.
[ 0.09794152528047562, 0.31567540764808655, -0.15229617059230804, 0.06902986019849777, -0.605873703956604, 0.0456894189119339, 0.7524139285087585, -0.29475122690200806, 0.013992706313729286, -0.502389669418335, 0.11882433295249939, 0.12368336319923401, -0.2321702539920807, -0.183235093951225...
I've got an app written in PHP, and there are a number of configurable variables. We're implementing a feature where the user can create sets of configurations and easily switch between them. How should I store my configs? as XML? in a .ini file? in multiple .ini files? in a db? What's going to provide the most flexib...
[ 0.6245797872543335, 0.1318395882844925, 0.21116545796394348, 0.3029121160507202, -0.048729486763477325, 0.12620267271995544, 0.052093204110860825, -0.07401663064956665, 0.033495958894491196, -0.672250509262085, 0.04571681097149849, 0.3575914204120636, -0.26912447810173035, -0.0848309770226...
.mdb files for our db.) I've been going down the xml route, but I'm having problems with adding and editing configs using SimpleXML. Also, the app has to be compatible with php 5.1.6, and I'm a little nervous about some of the functionality. Never really dealt with creating custom ini files.... A small clarification...
[ 0.5012575387954712, 0.036400530487298965, 0.5439050197601318, 0.02669925056397915, -0.14583143591880798, -0.31976816058158875, 0.24817487597465515, -0.14715422689914703, 0.10003747045993805, -0.6939072012901306, 0.028454281389713287, 0.4831097722053528, -0.48355185985565186, -0.04349469393...
not make much sense, IMO. I would choose either an ini file, an xml file, or a php file, as proposed by [jmucchiello](https://stackoverflow.com/questions/798654/how-to-store-configurations-for-php-app-xml-or-ini-or-db/798708#798708). Each option has it's pros and cons. As for xml versus ini, xml offers more flexibilit...
[ 0.4047538638114929, -0.11361885070800781, 0.06589363515377045, 0.21707482635974884, 0.1702188402414322, 0.20290113985538483, 0.1038341224193573, -0.1431894600391388, -0.07028817385435104, -0.7424384355545044, -0.09782527387142181, 0.4114375710487366, -0.40823808312416077, -0.10183317959308...
as I like the approach, for your current scenarion I would not recommend it.
[ 0.3364185094833374, 0.04620588943362236, 0.048505302518606186, -0.01563950814306736, 0.04845522716641426, -0.14174021780490875, 0.22627823054790497, 0.4144573211669922, 0.14836615324020386, -0.5131103992462158, 0.06552635133266449, 0.5328011512756348, 0.26080214977264404, 0.281932294368743...
How do I embed an external executable inside my C# Windows Forms application? Edit: I need to embed it because it's an external free console application (made in C++) from which I read the output values to use in my program. It would be nice and more professional to have it embedded. Second reason is a requirement to...
[ 0.4558205306529999, 0.44931286573410034, 0.17350295186042786, 0.01947706751525402, 0.11947877705097198, -0.2437639683485031, 0.014697490260004997, -0.1292131096124649, 0.08338522166013718, -0.6879487037658691, -0.09488052874803543, 0.6816021800041199, -0.2701798379421234, -0.13108693063259...
into the the file specified by [path] void ExtractResource( string resource, string path ) { Stream stream = GetType().Assembly.GetManifestResourceStream( resource ); byte[] bytes = new byte[(int)stream.Length]; stream.Read( bytes, 0, bytes.Length ); File.WriteAllBytes( path, bytes ); } string exePath ...
[ 0.09773126989603043, -0.01809815689921379, 0.491329550743103, -0.131532683968544, 0.24486395716667175, 0.12184230238199234, 0.2383665293455124, -0.016218269243836403, 0.10945658385753632, -0.4398682117462158, -0.2067466527223587, 0.6492711305618286, -0.3253450393676758, 0.2502562403678894,...
the name of the file, which you'll need to include in your project (make sure to set the build option to "Embedded Resource"). If you put the file under a directory, e.g. Resources, then that name becomes part of the resource name (e.g. "myProj.Resources.Embedded.exe"). If you're having trouble, try opening your compil...
[ 0.6032182574272156, -0.07442700862884521, 0.3779032528400421, 0.12862958014011383, 0.23958329856395721, -0.11127875745296478, 0.09568999707698822, 0.2736349403858185, -0.20977045595645905, -0.8754405379295349, -0.2220851331949234, 0.7446139454841614, 0.09880363196134567, 0.4364657402038574...
The current implementation of [Remy Sharp's jQuery tag suggestion plugin](http://remysharp.com/2007/12/28/jquery-tag-suggestion/) only checks for matches at the beginning of a tag. For example, typing "Photoshop" will not return a tag named "Adobe Photoshop". By default, the search is case-sensitive. I have slightly m...
[ -0.10213461518287659, 0.13607101142406464, 0.7594553828239441, -0.23788079619407654, -0.11995293945074081, -0.21558839082717896, 0.09621566534042358, -0.7012649178504944, 0.018650270998477936, -0.6860502362251282, -0.022572733461856842, 0.597551703453064, -0.4394121766090393, -0.0321286059...
have tried using `match`, but I can't seem to get it to work when a variable is present in the pattern: ``` for (i = 0; i < tagsToSearch.length; i++) { var ctag = jQuery.trim(currentTag.tag); if (tagsToSearch[i].match("/" + ctag + "/i")) { // this never matches, presumably because of the variable 'ctag' ...
[ 0.20036152005195618, -0.1437343806028366, 0.5071248412132263, -0.288798063993454, 0.017746055498719215, -0.3106050491333008, 0.2770964503288269, -0.2649343013763428, -0.12695692479610443, -0.5885528922080994, -0.010734409093856812, 0.5676144957542419, -0.7085400223731995, -0.01496394816786...
look like this (haven't tested, not sure, but right general idea): ``` for (i = 0; i < tagsToSearch.length; i++) { var ctag = jQuery.trim(currentTag.tag); var regex = new RegExp(ctag, "i") if (tagsToSearch[i].match(regex)) { matches.push(tagsToSearch[i]); } } ```
[ 0.053113192319869995, -0.39025914669036865, 0.7901927828788757, -0.46837931871414185, 0.07724815607070923, -0.111780546605587, 0.16025717556476593, -0.35508978366851807, -0.09517215192317963, -0.8025870323181152, -0.2002953588962555, 0.39720991253852844, -0.5042303204536438, 0.004001645371...
I've been scouring the net and SO and I can't get around or through this problem. We have a bunch of subdomains and a few dedicated servers. One server does double-triple duty as issue tracking and landing page. Problem is the wildcard landing page doesn't take you to the correct virtual host page sometimes. I've been...
[ 0.32701656222343445, -0.36637747287750244, 0.6626017093658447, 0.4898855686187744, 0.20142421126365662, -0.2866758406162262, 0.3498704433441162, 0.12921100854873657, -0.351346880197525, -0.611087441444397, 0.07304830849170685, -0.1774541139602661, -0.19804225862026215, 0.16212934255599976,...
while, but I got it to work and I'd rather not break it. -**www.askia.fr** is our french site. Instead of taking you to **www.askia.com** it takes you to the dev.askia.com. -**www.askia.co.uk** should take you to **www.askia.com** but it goes to **dev.askia.com** I'm not entirely sure where I should be trying ...
[ 0.4907863736152649, -0.23308683931827545, 0.6964836716651917, 0.307594895362854, 0.229453906416893, -0.10122929513454437, 0.4672048091888428, 0.2592651844024658, -0.3835684657096863, -0.4355526566505432, 0.0888385996222496, 0.3993849754333496, 0.34506210684776306, -0.1509551852941513, 0....
can add any number of (artificial) resources as you see fit, even ones that would require a JOINs from your Models.
[ 0.6057973504066467, -0.05246209725737572, 0.05454618111252785, 0.5354216694831848, 0.2923896014690399, 0.15133288502693176, -0.1589106023311615, 0.07857529073953629, -0.27797022461891174, -0.6849001049995422, -0.1606561243534088, 0.5153510570526123, -0.08554811775684357, -0.040969830006361...
That is pretty easy with a plain hash like ``` {:a => "a", :b => "b"} ``` which would translate into ``` "a=a&b=b" ``` But what do you do with something more complex like ``` {:a => "a", :b => ["c", "d", "e"]} ``` which should translate into ``` "a=a&b[0]=c&b[1]=d&b[2]=e" ``` Or even worse, (what to ...
[ 0.15626665949821472, 0.4907526969909668, -0.3705480098724365, 0.023675067350268364, -0.1447499841451645, -0.18707717955112457, 0.45509690046310425, -0.3138551414012909, 0.08422034233808517, -0.5525122880935669, 0.00881072599440813, 0.7830349802970886, 0.17523621022701263, -0.26314705610275...
characters, and there are a few other edge cases where it breaks down. ``` require "addressable/uri" uri = Addressable::URI.new uri.query_values = {:a => "a", :b => ["c", "d", "e"]} uri.query # => "a=a&b[0]=c&b[1]=d&b[2]=e" uri.query_values = {:a => "a", :b => [{:c => "c", :d => "d"}, {:e => "e", :f => "f"}]} uri.quer...
[ -0.13266338407993317, 0.35500022768974304, 0.29204607009887695, 0.001151556964032352, -0.0011763247894123197, 0.46386444568634033, 0.17214807868003845, -0.37070196866989136, 0.1166921928524971, -0.5500802397727966, -0.4636356234550476, 0.7595025300979614, -0.0932435467839241, -0.0443758927...
Please give me some hints on my issue. I'm building a queue data structure that: 1. has a backup on hard disk at realtime 2. and can restore the backup 3. Can respond to massive enqueue/dequeue request Thank you! Is this an exercise your doing. If not, you should probably look at some of the production message queue...
[ 0.0979604721069336, -0.11986659467220306, 0.4948801100254059, 0.24503135681152344, -0.09825322777032852, -0.109952412545681, 0.19256366789340973, 0.07271558046340942, -0.576042890548706, -0.68458092212677, -0.1936740130186081, 0.7814981341362, -0.4192717671394348, -0.006806205026805401, ...
this...
[ 0.09265068918466568, 0.4628868103027344, 0.09201928973197937, 0.10542070120573044, 0.038692135363817215, -0.06808336079120636, -0.09676840156316757, 0.01462316419929266, 0.10953082144260406, -0.6555996537208557, -0.10266280174255371, 0.2045675814151764, -0.1881304681301117, 0.2419480681419...
Trying to create a sequence in Oracle that starts with the max value from a specific table. Why does this not work? ``` CREATE SEQUENCE transaction_sequence MINVALUE 0 START WITH (SELECT MAX(trans_seq_no) FROM TRANSACTION_LOG) INCREMENT BY 1 CACHE 20; ``` you might want to start with `max(trans_seq_no) ...
[ -0.07952269911766052, 0.22502999007701874, 0.3212414085865021, -0.07546800374984741, 0.004133681301027536, 0.3874392509460449, 0.15489991009235382, -0.42199230194091797, -0.09934019297361374, -0.6099993586540222, -0.026148580014705658, 0.33610695600509644, -0.39764922857284546, 0.206560909...
values (my_number_sn.NEXTVAL) * ERROR at line 1: ORA-00001: unique constraint (NEIL.SYS_C00102439) violated ``` When you create a sequence with a number, you have to remember that the first time you select against the sequence, Oracle will return the initial value that you assigned it. ``` SQL> drop sequence my_numb...
[ 0.02002902701497078, 0.3740333020687103, 0.26020216941833496, -0.3430789113044739, 0.17559124529361725, 0.2749839723110199, 0.11005154997110367, -0.39384132623672485, -0.2912335693836212, -0.3114495277404785, -0.0761798769235611, 0.34863778948783875, -0.388907253742218, 0.3648560047149658,...
In the `bash` command line, I want to find all files that are named `foo` or `bar`. I tried this: ``` find . -name "foo\|bar" ``` but that doesn't work. What's the right syntax? You want: ``` find . \( -name "foo" -o -name "bar" \) ``` See the [wikipedia](http://en.wikipedia.org/wiki/Find) page (of all places)
[ 0.30657702684402466, 0.6545423269271851, 0.14190293848514557, -0.36963462829589844, 0.06899286806583405, -0.26696863770484924, 0.2509383261203766, -0.09736615419387817, -0.11937601864337921, -0.31895729899406433, -0.3022710084915161, 0.8674893975257874, -0.40584298968315125, -0.10336481034...
I'm basically looking for a python version of [Combination of `List<List<int>>`](https://stackoverflow.com/questions/545703/combination-of-listlistint) Given a list of lists, I need a new list that gives all the possible combinations of items between the lists. ``` [[1,2,3],[4,5,6],[7,8,9,10]] -> [[1,4,7],[1,4,8],......
[ 0.1449281871318817, -0.018118886277079582, 0.4342120289802551, -0.04474823176860809, 0.02345394156873226, 0.6533500552177429, 0.15722426772117615, -0.32450294494628906, -0.5884718298912048, -0.3763023018836975, -0.18608106672763824, 0.4003443121910095, -0.34089526534080505, -0.004247976001...
(2, 4, 9), (2, 4, 10), (2, 5, 7), (2, 5, 8), (2, 5, 9), (2, 5, 10), (2, 6, 7), (2, 6, 8), (2, 6, 9), (2, 6, 10), (3, 4, 7), (3, 4, 8), (3, 4, 9), (3, 4, 10), (3, 5, 7), (3, 5, 8), (3, 5, 9), (3, 5, 10), (3, 6, 7), (3, 6, 8), (3, 6, 9), (3, 6, 10)] ```
[ -0.16509303450584412, 0.6318694353103638, 0.5104071497917175, -0.0652233213186264, 0.1605946123600006, 0.9164235591888428, 0.644097626209259, -0.01137587707489729, -0.8278568387031555, -0.5367987155914307, -0.14329496026039124, 0.22426463663578033, -0.20138636231422424, 0.11117566376924515...
I would like to retrieve an error message that explains why the jvm failed to load. From the examples provided here: <http://java.sun.com/docs/books/jni/html/invoke.html> I extracted this example: ``` /* Create the Java VM */ res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args); if (res < 0) { // retrieve v...
[ 0.12997393310070038, 0.10999835282564163, 0.3049696385860443, -0.4331987500190735, 0.01311983447521925, 0.09143459051847458, 0.640539824962616, -0.2989141047000885, -0.18217824399471283, -0.6225831508636475, -0.17198441922664642, 0.620807409286499, -0.3094404339790344, 0.26007089018821716,...
I want to stdout or stderr. I believe I would need to capture stdout and stderr to get the error I'm looking for (unless of course there is a simpler way). I'm coding in C++ so if someone can show a way to capture the error into a stringstream that would be ideal. Thanks, Randy I was able to get what I needed by using...
[ 0.33311161398887634, 0.20937882363796234, 0.48398640751838684, -0.1966225951910019, -0.3598674535751343, 0.22616682946681976, 0.37767407298088074, -0.3567085862159729, -0.3540652394294739, -0.6087870001792908, -0.13542282581329346, 0.7366583347320557, -0.44240787625312805, -0.1627354770898...
args); jniErrors += buf; return 0; } ... JavaVMOption options[1]; options[0].optionString = "vfprintf"; options[0].extraInfo = my_vfprintf; JavaVMInitArgs vm_args; memset(&vm_args, 0, sizeof(vm_args)); vm_args.nOptions = 1; vm_args.options = options; vm_args.version = JNI_VERSION_1_4; vm_args.ignoreUnrecogni...
[ -0.19005891680717468, -0.24185873568058014, 0.5065504908561707, -0.15513436496257782, 0.1323719471693039, 0.28596171736717224, 0.8269448280334473, -0.38719600439071655, -0.5887210965156555, -0.37900692224502563, -0.2110307812690735, 0.7274592518806458, -0.3260522186756134, -0.0291099511086...
I have added multi-language using the short article below. When you add for example German language you will have these files: formMain.resx formMain.de-DE.resx formMain.Designer.cs formMain.cs In first file you will have resources for neutral language, like strings, images, .. So now you need to add also resources...
[ 0.23999911546707153, -0.04163014888763428, 0.5348518490791321, 0.19711104035377502, -0.24351714551448822, 0.16805297136306763, 0.4941871464252472, -0.3638647794723511, -0.10436874628067017, -1.0666176080703735, -0.11572536081075668, 0.4544893801212311, -0.45504602789878845, 0.3563677072525...
the same Name key's from previous resource, and just change the Value with coresponding german words. Now to access created resource from the source it will be like this. MessageBox.Show(formMain\_Strings.SameStringName); However, I have changed my to Thai language. Everything works fine when I run my app in VS. How...
[ 0.42570874094963074, 0.21762357652187347, 0.3596731424331665, -0.028884055092930794, 0.11407338082790375, -0.09309528023004532, 0.5850110650062561, -0.11833721399307251, -0.1461367905139923, -0.7947542071342468, -0.20933695137500763, 0.5762799978256226, -0.09877119213342667, -0.08394183218...
'MultiLanguage.exe'... Packaging file 'Lang.Strings.th-TH.resx'... ``` As everything works fine when running in visual studio. Is there something I need to do to get it to run once its been installed. All the properties for each of the file I have keep the default. Many thanks, ========= ``` static void Main() ...
[ 0.3703109622001648, -0.125716432929039, 0.6635111570358276, -0.02683188207447529, 0.09373214095830917, 0.0140009680762887, 0.3185333013534546, -0.04687875881791115, -0.30050116777420044, -0.7243838906288147, -0.24529892206192017, 0.4605499804019928, -0.499735563993454, 0.23103290796279907,...
Output\ . From dialog select the project for which you want to include localization (satelite) assemblies and then select Localized resources. After the installation in the folder that I install to, I have the th-TH folder which includes the satellite assembly. Thanks,
[ 0.3112865090370178, -0.04296015948057175, 0.2975863218307495, 0.0415634885430336, 0.10979660600423813, -0.059987567365169525, -0.07689853012561798, 0.30942150950431824, 0.13358402252197266, -1.0247293710708618, -0.35394421219825745, 0.4725673198699951, -0.11453287303447723, -0.107040062546...
I am trying to debug my web app and i have realised that firebug is making it damn slow. Is there any reason for this? Are there any set of reasons like maybe long js file which cause this problem? Thank you very much. **UPDATE** Am developing a web-app which will be primarily used by developers. Now if I dont find o...
[ 0.520089864730835, 0.5399931073188782, 0.5156022906303406, 0.08880390226840973, 0.026945795863866806, -0.3935309648513794, 0.8935061097145081, 0.5689295530319214, 0.027228407561779022, -0.7183232307434082, -0.05557836592197418, 0.7092031836509705, -0.1961475908756256, 0.05214869976043701, ...