text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I have a table with some geometry types in and need to be able to return the SRID of a given field. How can I do this. I have had a search but all I can find is the function to alter a SRID. In Oracle I am doing this: ``` A.CLUSTER_EXTENT.SDO_SRID ``` Is there an equivalent function in PostGIS? [ST\_SRID](http://po...
[ 0.002023165812715888, 0.11273946613073349, 0.5533775091171265, -0.1513209342956543, -0.2941295802593231, -0.011154753156006336, -0.09150940924882889, -0.4318949282169342, -0.03417818248271942, -0.6793559193611145, 0.15451262891292572, 0.5389098525047302, -0.2974816560745239, 0.059278000146...
I want to ask about strcpy. I got problem here. Here is my code: ``` char *string1 = "Sentence 1"; char *string2 = "A"; strcpy(string1, string2); ``` I think there is no problem in my code there. The address of the first character in string1 and string2 are sent to the function `strcpy`. There should be no problem ...
[ -0.1013706624507904, 0.36721310019493103, 0.33600425720214844, -0.06555821746587753, -0.13027028739452362, 0.24053366482257843, 0.29067090153694153, 0.14513938128948212, -0.3132646679878235, -0.6516274809837341, -0.17385421693325043, 0.5071517825126648, -0.4522257447242737, 0.1223976537585...
memory (the stack via `char string1[<size>];` for example, or the heap via `char *string1 = malloc(<size>);`). Be sure to replace with the amount of buffer space you need, and add an extra byte at least for NULL termination. If you `malloc()`, be sure you `free()` later!
[ 0.13529707491397858, 0.061761435121297836, 0.12774187326431274, 0.003250191221013665, 0.5217978954315186, 0.03653160482645035, 0.2382907271385193, -0.09628725051879883, -0.46006712317466736, -0.4935075342655182, -0.45082026720046997, 0.5877953767776489, -0.10206704586744308, -0.10689152777...
I get an array using the function preg\_match\_all. The code is as it is: ``` $str = $dataGroups['groups']; preg_match_all('/[0-9]/', $str, $matches); ``` It return an associated array from the type: ``` array(5) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" [3]=> string(1) "4" [4]=> string(1) "5"...
[ -0.26844295859336853, 0.21892642974853516, 0.5101161003112793, -0.3029508590698242, -0.10155963897705078, 0.13203659653663635, 0.23854458332061768, -0.5285918712615967, -0.05077346786856651, -0.3819032609462738, -0.018146663904190063, 0.5011429190635681, -0.3760870695114136, 0.117200501263...
the table.So to make it clear If I want to insert all values which have id 67 I think I need something like this form my codeigniter active record: > array(5) { [67]=> string(1) "1" [67]=> string(1) "2" [67]=> string(1) "3" [67]=> string(1) "4" [67]=> string(1) "5" } And use the AR command: > $this->db->insert('myta...
[ 0.1844034194946289, 0.38646093010902405, 0.5196084380149841, -0.21850809454917908, -0.060602180659770966, 0.2312830537557602, 0.22409185767173767, -0.42283838987350464, -0.3237968683242798, -0.5160457491874695, 0.0788261815905571, 0.9511122107505798, -0.23076413571834564, -0.17987819015979...
cannot have duplicate keys in an array, they have to be unique as they are there for referencing! However, what you could do it have an associative array like so: ``` $array = array( 1 => array( 'id' => 67 ), 2 => array( 'id' => 67 ) ); ```
[ 0.12693604826927185, 0.15334805846214294, 0.15954670310020447, 0.06823843717575073, 0.14486894011497498, -0.06466366350650787, 0.27110734581947327, -0.37924662232398987, -0.4037379324436188, -0.39535632729530334, 0.08807312697172165, 0.49011045694351196, -0.3274651765823364, 0.225488275289...
I have a newsletter with 13k subscribers. I would like to use Google to send the newsletter instead of the free edition of mailenable I am using currently. The main thing that has put me off is the 2,000/day sending limit as it would take a week to send out a bi weekly newsletter which may have time sensitive informat...
[ 0.6264925003051758, 0.026829665526747704, 0.38222813606262207, -0.010351907461881638, -0.35994288325309753, 0.17355765402317047, 0.5315158367156982, 0.13526037335395813, -0.2976677417755127, -0.4090804159641266, 0.30096420645713806, 0.34337806701660156, 0.14101524651050568, 0.2781448066234...
email queries. However, I called the Google apps sales team and they said Google says anything above 2,000 emails is spam and has no legitimate purpose (I had the feeling though that the person I was talking to was poorly trained and had no idea what the GAE was). So would I need to create my own google app that acts ...
[ 0.5126503109931946, 0.3931642770767212, 0.4409838914871216, 0.24350500106811523, -0.2523263394832611, -0.021726857870817184, 0.6631687879562378, 0.014687488786876202, -0.32639235258102417, -0.3275362551212311, 0.0828072801232338, 0.34989428520202637, -0.23508428037166595, -0.01233616843819...
my experience GAE is a very **bad** platform to send bulk emails. For a long time it didn't support DKIM or Sender Id, its hard to mange bounces, and on top of everything you need to write your own framework for bulk sending using tasks or backends. The cost of instances time for sending those emails might even dou...
[ 0.28819525241851807, -0.1604432910680771, 0.11451741307973862, -0.022811777889728546, -0.49089163541793823, -0.030332917347550392, 0.06801245361566544, 0.3797547519207001, -0.13522011041641235, -0.6025298237800598, 0.385431706905365, 0.46268168091773987, -0.03177981078624725, 0.16690680384...
I am creating a very simple web service and I don't want to bother with some framework to implement it. I am trying to make it so I can call a method on a class by using a string like ``` $myMethod = "test"; $args = array("arg1", "arg2"); $myMethod(); ``` The problem is there may be a different number of arguments...
[ 0.3295666575431824, 0.147786483168602, -0.08939527720212936, 0.008860825560986996, -0.15779268741607666, 0.016985706984996796, 0.4152631163597107, -0.15797267854213715, 0.01438814215362072, -0.6165080070495605, 0.2660767138004303, 0.3634485602378845, -0.5051771402359009, 0.2120401263236999...
what they told you about not using `eval()` in PHP? Think of `call_user_*` functions just like `eval()` - they're horribly slow. **Solutions** **1)** You can pass arguments blindly like this: ``` $mtd = 'test'; $args = array('a','b'); array_pad($args, 8, null); return $mtd($args[0],$args[1],$args[2],$args[3],$args[4...
[ -0.09959923475980759, 0.03419080749154091, 0.5716748833656311, -0.15979841351509094, 0.10306376218795776, 0.11951050162315369, 0.6483492255210876, -0.505937933921814, -0.15556016564369202, -0.11675666272640228, -0.1133040264248848, 0.6288896799087524, -0.7313607931137085, 0.058646041899919...
$args); // slow, but safe } ``` **3)** Finally, you can do the same thing Drupal did to solve this; generate and cache PHP code. The generated code is hard-coded to work on a specific number of arguments, but clearing the cache will make it increase/decrease argument count as necessary. Plus, it's the fast way possib...
[ 0.08095670491456985, 0.10503508150577545, 0.3316394090652466, 0.09733542054891586, -0.16075021028518677, -0.0053638857789337635, 0.28522199392318726, -0.08755414932966232, -0.1390063464641571, -0.5591576099395752, 0.247547447681427, 0.5816452503204346, -0.18424734473228455, -0.007890090346...
I am working in a cluster where each node has 16 processors. My version of Open MPI is 1.5.3. I have written the following simple code in fortran: ``` program MAIN implicit none include 'mpif.h' integer status(MPI_STATUS_SIZE) integer ierr,my_rank,size integer irep, nrep, iex character*1 task !Initia...
[ -0.5387000441551208, 0.13235849142074585, 0.7742917537689209, -0.13932035863399506, -0.09783167392015457, 0.3076035678386688, 0.27015385031700134, -0.4031199514865875, -0.4480506181716919, -1.0184723138809204, -0.14127206802368164, 0.1631252020597458, -0.4263320565223694, 0.165846735239028...
irep=1,nrep-1 task='q' print *, 'master',iex,task call mpi_send(task,1,MPI_BYTE,irep,irep+1, & MPI_COMM_WORLD,ierr) enddo else !Here are the tasks for the slaves !Receive the task sent by the master node
[ -0.3574528098106384, -0.3195796012878418, 0.4080820083618164, 0.1896008402109146, 0.13238069415092468, 0.49398818612098694, 0.17887340486049652, -0.31236591935157776, -0.5692682266235352, -0.81435227394104, -0.024389106780290604, 0.14674217998981476, -0.4488956332206726, 0.1394919604063034...
call mpi_recv(task,1,MPI_BYTE,0,my_rank+1, & MPI_COMM_WORLD,status,ierr) print *, 'slaves', my_rank,task endif enddo call mpi_finalize(ierr) end ``` then I compile the code with: ``` /usr/lib64/openmpi/bin/mpif77 -o test2 test2.f ``` and run it with ``` /usr/lib64/openm...
[ -0.10218005627393723, -0.13714691996574402, 0.7640456557273865, -0.08811505883932114, 0.15244796872138977, 0.3857131004333496, 0.36801719665527344, -0.6663771867752075, -0.5563021898269653, -0.7971387505531311, -0.24074722826480865, 0.44135522842407227, -0.28937044739723206, 0.073635704815...
its task and I get the prompt back in the terminal. But when I try -np 32, not all the slaves finish their work, only 16 of them. Actually with 32 nodes the program doesn't give me the prompt back, so that I think the program is stacked somewhere and is waiting for some task to be perform. I would like to receive a...
[ -0.07467301934957504, -0.1084466278553009, 0.2859686613082886, 0.006883837282657623, -0.2626059651374817, 0.22146932780742645, 0.3174401819705963, -0.029530247673392296, -0.43430227041244507, -0.7343575358390808, 0.2005106657743454, 0.44303613901138306, -0.12247322499752045, -0.14215090870...
Think of `call_user_*` functions just like `eval()` - they're horribly slow. **Solutions** **1)** You can pass arguments blindly like this: ``` $mtd = 'test'; $args = array('a','b'); array_pad($args, 8, null); return $mtd($args[0],$args[1],$args[2],$args[3],$args[4],$args[5],$args[6],$args[7]); ``` **2)** You can ...
[ -0.2788197696208954, -0.043178457766771317, 0.5879921913146973, -0.16533789038658142, 0.2073165476322174, 0.18359237909317017, 0.5531678795814514, -0.5615925788879395, -0.0254348274320364, -0.3336513042449951, -0.239864781498909, 0.6766635775566101, -0.6683828830718994, -0.0034004515036940...
same thing Drupal did to solve this; generate and cache PHP code. The generated code is hard-coded to work on a specific number of arguments, but clearing the cache will make it increase/decrease argument count as necessary. Plus, it's the fast way possible.
[ -0.012138566933572292, 0.0541791208088398, 0.18809333443641663, 0.3594043254852295, -0.30587100982666016, -0.03316215053200722, 0.17585088312625885, -0.049066878855228424, -0.014604464173316956, -0.4607359766960144, 0.31514865159988403, 0.44546711444854736, 0.007033336907625198, -0.0938835...
I was searching if there is possible to change global size of all components in Nimbus Look and Feel. There is a [tutorial](http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/size.html) for re-sizing a component; but not for all components. I've found something like this: <http://www.jasperpotts.com/blog/200...
[ -0.16536951065063477, -0.1708078384399414, 0.7035038471221924, 0.10553564131259918, -0.27045246958732605, -0.03718450665473938, 0.3330678641796112, 0.19371414184570312, -0.40812572836875916, -0.6154865026473999, 0.6228920221328735, 0.3103422522544861, -0.1515227109193802, 0.260949611663818...
I have already implemented a functionallity, when keeper automatically moves using breadth first search algorithm. Now I want it to move boxes automatically as well (if keeper can move box from source to destination without moving another boxes). How to I do it? I've tried modifying BFS, not haven't yet succeed. **UPD...
[ 0.12657000124454498, -0.1890939176082611, 0.4816770851612091, 0.11242279410362244, -0.024783551692962646, -0.21954962611198425, 0.3515046238899231, -0.37361228466033936, -0.32675954699516296, -0.6431400775909424, 0.030076876282691956, 0.421859472990036, -0.05172409489750862, -0.02171649597...
be moved in order to do so. Use breadth-first search as before (or A\* if you prefer), but search the appropriate set of states. When you are searching for a path for the keeper, the states correspond to the squares in the grid. But when you are searching for a way for the keeper to move a block, the states correspond...
[ -0.014152339659631252, -0.1634889543056488, 0.28962019085884094, 0.15946201980113983, -0.23617589473724365, 0.02386469580233097, 0.3837980329990387, -0.6636233329772949, -0.3156823515892029, -0.8118222951889038, -0.29949745535850525, -0.1815345287322998, -0.22649644315242767, 0.24899141490...
and one block. The state space consists of pairs of squares occupied by the keeper and the block. There are 56 such states, drawn as small circles in the diagram below. ![state space with 56 states](https://i.stack.imgur.com/c3uMK.png) The lines show possible transitions within this state space. The thin lines corres...
[ 0.09633447974920273, -0.08266409486532211, 0.3089621961116791, 0.13678833842277527, -0.0417957529425621, 0.4313230514526367, 0.4808439314365387, -0.6107030510902405, -0.4576394259929657, -0.5870686173439026, -0.3231410086154938, -0.26393622159957886, -0.29795363545417786, 0.446133226156234...
by following the red path in the state space: ![non-trivial path in state space](https://i.stack.imgur.com/fUEPz.png) Note that along this path, the block goes through the positions 7–6–5–6–7–8. You couldn't have found this path by just considering positions for the block, as the block passes through positions 6 and ...
[ -0.24423368275165558, 0.08369744569063187, 0.29790592193603516, -0.2574887275695801, -0.07811138033866882, 0.11040928214788437, 0.6052245497703552, -0.18907228112220764, -0.3684450387954712, -0.561161458492279, -0.3758276700973511, 0.0317767970263958, -0.15353107452392578, 0.30991968512535...
I am having trouble SELECTing a column of type `uniqueidentifier` and putting it in a variable of type `Guid` in ASP.net. The database is generating the `uniqueidentifier`, and all I want to do is pull them out and store the values in case I need to populate a foreign key table. I am using a private member to store t...
[ 0.005738509353250265, 0.2761651277542114, 0.26848581433296204, -0.05023837089538574, -0.12841399013996124, -0.1397472620010376, 0.06069419905543327, -0.0863829180598259, -0.09388762712478638, -0.4861837327480316, 0.14563967287540436, 0.2985268533229828, -0.22524726390838623, 0.504030764102...
vRdr.GetGuid("uniqueID") end if ``` The error I get is > Input string was not in a correct format. I am not sure why I am having so much trouble trying to select these values. I have also tried `Guid.Parse()` and `Guid.TryParse()` on the data reader value with no luck. Thanks for reading. According to [the MSDN ...
[ -0.1681385040283203, 0.272350549697876, 0.6819836497306824, -0.06001220643520355, -0.3094007074832916, -0.1759575754404068, 0.2610815763473511, -0.13393737375736237, -0.17895780503749847, -0.5229405164718628, -0.22345058619976044, 0.6096987724304199, -0.4219518303871155, 0.2331604808568954...
Here is the site in question: <http://jayduff.co.uk/> I previously had the images/links on the left and the header on the left, I decided to change it to make it more standardized but the top two divs that hold the title and the links don't seem to align up properly anymore? Here is the CSS for both my link div and ...
[ 0.49013254046440125, 0.1440238058567047, 0.7151804566383362, -0.15042391419410706, -0.12486758828163147, -0.025984089821577072, 0.02489619329571724, 0.10362952947616577, 0.046834077686071396, -0.5234766006469727, -0.34199753403663635, 0.21701979637145996, -0.09190172702074051, 0.2238764017...
-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; } #links { margin-top:40px; } ``` I then have a div below... which holds my body text ``` #mainText { width: 450px; word-wrap: break-word; margin-left:45px; } ``` I'm pretty sure I am missing...
[ -0.0033707842230796814, 0.19705288112163544, 0.7080206274986267, 0.036571722477674484, -0.2023126780986786, -0.04294469580054283, 0.330036461353302, -0.3796764016151428, -0.008052929304540157, -0.6581007838249207, -0.2557919919490814, 0.4995929002761841, -0.09023340046405792, -0.2525136470...
is an example of how it should be ``` title links **************************** * JOSHUA DUFFY * O O O O * **************************** * mainbody
[ -0.3480212092399597, 0.24752463400363922, 0.361908882856369, -0.023754892870783806, 0.2263716757297516, -0.24237939715385437, 0.25633805990219116, 0.3817705810070038, 0.0750468373298645, -0.7731406688690186, -0.2793235182762146, 0.3860490918159485, 0.09690336138010025, 0.24649165570735931,...
* * * * * **************************** ``` Hope that makes sense, where am I going wrong? I'm pretty sure its not the placement of my divs just the attributes above? Thanks in advance While I understand this is not an answer to the question, I thought it
[ 0.5558480024337769, 0.6739702820777893, 0.19052591919898987, 0.04999314248561859, 0.054135389626026154, -0.29162585735321045, 0.6030362844467163, 0.2352021485567093, -0.2184450775384903, -0.7574055194854736, -0.013187391683459282, 0.7099974751472473, 0.10268650949001312, 0.0810797214508056...
might help to see a non-recursive version of the logic: ``` // Our array of messy words var capitals = ["berlin", "parIs", "MaDRiD"]; // Simple function to capitalize word function fixLetterCase(array) { for(var i = 0; i < array.length; i++) { array[i] = array[i].charAt(0).toUpperCase() + array[i].slice(1...
[ -0.16429173946380615, -0.07440638542175293, 0.6831720471382141, -0.2098565697669983, 0.03799095377326012, 0.35866206884384155, 0.3070846498012543, -0.4746600091457367, -0.1682608425617218, -0.48666301369667053, -0.14830197393894196, 0.34410360455513, -0.17626014351844788, -0.07520195841789...
I need to check if an object contains any value. The following function works fine if the object is a String type but I was looking to replace this with a generic way without checking for the type. Is there a way to do this? Thanks in advance. ``` public void SetValue(int id, object fieldData) { if (field...
[ 0.26628273725509644, -0.14692065119743347, 0.4710191488265991, -0.11300697177648544, 0.17284291982650757, -0.294533908367157, 0.5940986275672913, -0.282421737909317, 0.09313265234231949, -0.655590832233429, 0.11238401383161545, 0.8148216605186462, -0.5061086416244507, 0.01759582944214344, ...
{ return; } } SetLOValue(id, fieldData); } ``` You can check for default types if you make it generic, but you have to be sure that's what you want. i.e. is 0 a valid number in your usage? ``` if (fieldData == default(T)) { return; } ``` Alternatively, you could s...
[ 0.1673211008310318, -0.411565363407135, 0.3028723895549774, -0.1312119960784912, 0.26033157110214233, -0.07522069662809372, 0.18912087380886078, -0.16304317116737366, -0.27531564235687256, -0.4816689193248749, -0.4099405109882355, 0.6578407287597656, -0.45398280024528503, 0.125688418745994...
we have a json serializer and deserializer downloaded, it reads the profile object find, but its not putting in the Client item in the list. Here is the json ``` {"Profile": [{ "Name":"Joe", "Last :"Doe", "Client":
[ 0.35278719663619995, -0.09923235327005386, 0.08507400751113892, 0.07498931884765625, 0.3068051040172577, 0.04171399399638176, -0.14246895909309387, 0.008797207847237587, -0.2037917673587799, -0.7420018315315247, -0.06783755868673325, 0.5647730231285095, -0.33100518584251404, -0.20491313934...
{ "ClientId":"1", "Product":"Apple", "Message":"Peter likes apples"
[ -0.35759755969047546, 0.0868556872010231, -0.08485253155231476, -0.08374296873807907, 0.3935900032520294, 0.7201417088508606, 0.10736632347106934, 0.6556028127670288, -0.2758525013923645, -0.6721458435058594, -0.28775283694267273, 0.5789220333099365, -0.4074922502040863, -0.216124475002288...
}, "Date":"2012-02-14" }]} ``` So in my profile class i have ``` public class Profile { public string Name {get; set;} public string Last {get; set;} public List<Client> Client {get; set;} public DateTime dDate {get; set;}
[ 0.22946536540985107, -0.29661133885383606, 0.6199939250946045, -0.3592907190322876, 0.1110989972949028, 0.05789904668927193, 0.14047077298164368, 0.15350688993930817, -0.057783953845500946, -0.9487643241882324, -0.07467329502105713, 0.49241331219673157, 0.14565525949001312, 0.2306743711233...
public Profile() { } public Profile BuildEntity() { Profile profile = new Profile(); profile.Name = this.Name; profile.Last = this.LastName; profile.Client = this.client; profile.dDate = this.dDate;
[ 0.07497214525938034, -0.4079767167568207, 0.4451344907283783, -0.3027328848838806, -0.022637829184532166, 0.28087976574897766, 0.3488839566707611, -0.011758968234062195, -0.014031645841896534, -1.0518336296081543, -0.19452761113643646, 0.6862865686416626, -0.08329775184392929, 0.3801049590...
return dDate; } } ``` Now, when I debug all the items have values except for the list. Does anyone know what it might be? NOTE: This is being posted to our Profile.asmx web service Regards You can check for default types if you make it generic, but you have to be sure that's what you want. i.e. is 0 a va...
[ 0.2615449130535126, -0.2027648538351059, 0.32134583592414856, -0.06954306364059448, -0.002426198683679104, -0.16410547494888306, 0.42183634638786316, 0.02890998125076294, -0.2772800624370575, -0.7279788851737976, -0.20939193665981293, 0.7441884279251099, -0.3479464054107666, 0.335607200860...
Is there anyways to add tooltips to a non hyper link? ie . I want to have a mouse over tooltip when it goes over a text I would appreciate a working example of tooltip that is not based on a hyperlink Thanks If by tooltip you mean the `title` attribute, you can apply that to a lot of different HTML elements. For exa...
[ 0.41951295733451843, -0.04265933111310005, 0.4886988699436188, 0.0772162601351738, -0.16384784877300262, -0.1677376925945282, -0.1301274448633194, -0.13118202984333038, -0.39135822653770447, -0.4621207118034363, -0.020228475332260132, 0.5988535284996033, -0.148171067237854, -0.348568797111...
[Tabs document](http://www.jeasyui.com/documentation/tabs.php) I would like to create a new tab which from the link that is in a tab . for example, in tab a , there is a link "open tab b" , and it should add a tab b , I tried the way create tab that when the link is not in tab (which is working) however, in this ...
[ 0.20260894298553467, 0.08065599203109741, 0.6249253749847412, -0.23026683926582336, -0.1734713762998581, -0.20262184739112854, 0.17527900636196136, -0.13767392933368683, -0.14044234156608582, -0.5740712881088257, -0.40041640400886536, 0.6680866479873657, -0.39074844121932983, 0.23236371576...
} else { var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>'; $('#tt').tabs('add',{ title:title, content:content, closable:true }); } } ``` full page ``` <? include("../conn...
[ -0.14906243979930878, -0.1185784712433815, 0.9231793880462646, -0.05061311647295952, 0.013064875267446041, -0.05394366383552551, 0.09277337789535522, -0.11039485037326813, -0.2939446270465851, -0.5635621547698975, -0.5451197624206543, 0.6764876842498779, -0.37466204166412354, 0.13361564278...
1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> @import "../plugin/easyui/themes/default/easyui.css"; @import "../plugin/easyui/themes/icon.css"; @import "../plugin/bootstrap/css/bootstrap.css"...
[ -0.07017453759908676, -0.3589414358139038, 0.8831138610839844, -0.19687184691429138, -0.00623281579464674, 0.06329764425754547, -0.1598290652036667, -0.4955204427242279, -0.30922606587409973, -0.6529058218002319, -0.6970049142837524, 0.5254639983177185, -0.6276029348373413, -0.302321910858...
$('#tt').tabs('add',{ title:title, content:content, closable:true }); } } $(function(){ $("#closeTab").click(function() { $.post("clear.php",function(data){ window.parent.$('#tt').tabs('close','Create List');
[ 0.21309354901313782, -0.018127502873539925, 0.6053454279899597, -0.1568422168493271, 0.114425890147686, 0.002354656346142292, 0.2079675942659378, 0.13741056621074677, 0.15678778290748596, -0.2644399404525757, -0.41920486092567444, 0.5811615586280823, -0.3339836299419403, 0.376688688993454,...
location.reload(); }); }); }); </script> </head> <body style="background:#7C96A8;"> <div id="stylized" class="myform"> <form id="addlist" method="post" action="addNext.php" > <h1>Create your new subscriber list</h1> <p>Create a new list before adding subscriber <label class="right"><span class="label l...
[ 0.19322483241558075, -0.28356561064720154, 0.8107920289039612, -0.25757378339767456, 0.06604215502738953, 0.1292031705379486, 0.2023954540491104, -0.6979866623878479, -0.34911876916885376, -0.6671326160430908, -0.3352550268173218, 0.25423434376716614, -0.2975899875164032, 0.134818688035011...
unsubscribe:</label> <input type="checkbox" class="checkbox" name="unsubscribe" value="1" <? if (isset($_SESSION['unsubscribe']) && $_SESSION['unsubscribe']==1){echo "checked='yes'";}?> > <div class="spacer"></div> <input type="button" id="closeTab" value="Cancel" class="btn" style="width:100px"/> <input type="submit...
[ 0.3025314509868622, -0.13278722763061523, 0.5044127106666565, -0.24433720111846924, 0.01376871857792139, 0.3384706974029541, 0.4032950699329376, -0.8159686326980591, -0.09395292401313782, -0.44047829508781433, -0.31152480840682983, 0.3531232178211212, -0.26185739040374756, 0.30388256907463...
any list yet.</div>';} else { echo '<h1>Your Subscriber List</h1> <p>You have created '.$numRows.' list(s).</p>'; foreach ($result as $set) { try{ $sql = ' SELECT ls.SubID FROM list_sub ls,user_list ul WHERE ul.UserID=? AND ls.ListID='.$set['ListID'].' AND ls.ListID=ul.ListID '; $s...
[ 0.3463376760482788, -0.3772391676902771, 0.7503183484077454, -0.3015545606613159, 0.12395355105400085, -0.05558359995484352, 0.11223521828651428, -0.5565856099128723, -0.31360310316085815, -0.5662553906440735, -0.32919400930404663, 0.14904311299324036, -0.28098559379577637, 0.2526710927486...
List','list/view.php')" class='btn'>Manage List</a><? echo '<p></p>'; }} ?> <div class="spacer"></div> </div> <br><br><br> <div id="stylized" class="myform"> <? // list out the public list try{ $query = ' SELECT * FROM list Where IsPublic=1 '; $stmt = $conn->prepare($query); $stmt->execute(); $res...
[ 0.20727130770683289, -0.3692481517791748, 0.5369388461112976, -0.34632378816604614, -0.02877446636557579, 0.1793202906847, 0.3375262916088104, -0.8145418167114258, -0.3554411828517914, -0.3331349492073059, -0.4664742648601532, 0.39376702904701233, -0.41648221015930176, 0.000857347331475466...
ls.SubID FROM list_sub ls,user_list ul WHERE ul.UserID=? AND ls.ListID='.$set['ListID'].' AND ls.ListID=ul.ListID '; $stmt = $conn->prepare($sql); $stmt->execute(array($_SESSION['username'])); $numSubs= $stmt->rowCount(); } catch(PDOException $e) { die ($e->getMessage().'<a href="add.php"...
[ -0.12638729810714722, -0.5034427642822266, 0.6974017024040222, -0.3779398500919342, -0.05374719947576523, 0.3640769124031067, 0.18001137673854828, -0.6334583759307861, -0.2073623538017273, -0.6359653472900391, -0.39167773723602295, 0.17419040203094482, -0.4079726040363312, -0.0361740067601...
@import "../plugin/easyui/themes/default/easyui.css"; @import "../plugin/easyui/themes/icon.css"; @import "../plugin/bootstrap/css/bootstrap.css"; @import "../plugin/bootstrap/css/bootstrap-responsive.css"; @import "../style/form.css"; </style> <script src="../plugin/jquery-1.6.1.min.js"></scrip...
[ 0.06046278774738312, -0.10696764290332794, 0.6909319162368774, -0.30212053656578064, 0.15619802474975586, 0.14957036077976227, 0.1608985811471939, -0.39587661623954773, -0.20683494210243225, -0.4377285838127136, -0.6267947554588318, 0.4904160797595978, -0.45254719257354736, 0.1148611679673...
if ($('#tt').tabs('exists', title)){ $('#tt').tabs('select', title); } else { var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:100%;"></iframe>'; $('#tt').tabs('add',{ title:title, content:content, ...
[ 0.07168359309434891, -0.06886249035596848, 1.044486403465271, 0.05083697289228439, 0.40127649903297424, 0.02966364659368992, 0.057229600846767426, -0.04074179753661156, -0.20791976153850555, -0.41995134949684143, -0.4738135039806366, 0.7388447523117065, -0.10278692841529846, 0.155243396759...
tools:[{ iconCls:'icon-mini-refresh', handler:function(){ var tab = $('#tt').tabs('getSelected'); $('#tt').tabs('update', { tab: tab,
[ 0.01171982754021883, -0.39835307002067566, 0.5568705797195435, 0.08897379785776138, 0.23613549768924713, 0.2840542197227478, 0.1338886171579361, -0.17335186898708344, -0.21587149798870087, -0.6608059406280518, -0.3036802411079407, 1.0375735759735107, -0.38343724608421326, -0.14747567474842...
options:{ title:title, content:content, closable:true } });
[ -0.06784653663635254, -0.2255801260471344, 0.47010019421577454, 0.25609713792800903, 0.4696250557899475, -0.029268739745020866, 0.10963470488786697, -0.011909646913409233, 0.1571616679430008, -0.21253842115402222, -0.8666099905967712, 0.8723898530006409, -0.11418339610099792, 0.24750477075...
} }] }); } } function init() { $("#addtab1").on("click",function() {
[ 0.012281072326004505, -0.1742314249277115, 0.32524222135543823, -0.34290024638175964, 0.4191417396068573, 0.1379239708185196, 0.3071211874485016, -0.05133044719696045, -0.033658262342214584, -0.4609185755252838, -0.2514725923538208, 0.7980136275291443, -0.7035292983055115, 0.20301584899425...
addTab("slashdot","http://www.slashdot.org/"); }); $("#addtab2").on("click",function() { addTab("slashdot","http://www.slashdot.org/"); }); } $(init); </script> </head> <body style="background:#7C96A8;padding:10px;"> <div id="stylized" class="myform...
[ 0.3031925857067108, -0.4747537076473236, 1.0254451036453247, -0.1680118292570114, -0.039573557674884796, 0.18507930636405945, 0.16773061454296112, -0.384090781211853, -0.2796592712402344, -0.9138157963752747, -0.1816369593143463, 0.3387924134731293, -0.4528655409812927, -0.0425401590764522...
<strong>List name:</strong> <span class="small">Add your list name</span> </label> <input id="lname" name="lname" class="required" <?if (isset($_SESSION['lname'])) { echo "value=".$_SESSION['lname'];}?> /> <div class="spacer"></div> <label><strong>Reminder:</strong> <span class="small">Remind the details of your list...
[ 0.09422323107719421, -0.08964313566684723, 0.33214572072029114, -0.38144180178642273, -0.11010622978210449, 0.2029142528772354, 0.3035072386264801, -0.8701092600822449, -0.22668404877185822, -0.36890050768852234, -0.1806926280260086, 0.3516330122947693, -0.20720721781253815, -0.12741649150...
list,user_list WHERE user_list.UserID=? AND list.ListID=user_list.ListID '; $stmt = $conn->prepare($sql); $stmt->execute(array($_SESSION['username'])); $result= $stmt->fetchAll(); $numRows= $stmt->rowCount(); } catch(PDOException $e) { die ($e->getMessage().'<a href="add.php"> Back</a>'); } if ...
[ 0.25836923718452454, -0.3625066578388214, 0.7312105298042297, -0.3281806707382202, 0.027621472254395485, 0.37763407826423645, 0.17142575979232788, -0.8188357949256897, -0.4644302725791931, -0.34521493315696716, -0.2881971001625061, 0.3402197062969208, -0.47002556920051575, 0.20209273695945...
AND ls.ListID='.$set['ListID'].' AND ls.ListID=ul.ListID '; $stmt = $conn->prepare($sql); $stmt->execute(array($_SESSION['username'])); $numSubs= $stmt->rowCount(); } catch(PDOException $e) { die ($e->getMessage().'<a href="add.php"> Back</a>'); } echo '<span class="label">List Name</span> : <strong>'...
[ 0.15652401745319366, -0.3365301191806793, 0.42302870750427246, -0.3551962077617645, -0.07298831641674042, 0.31663021445274353, 0.10999108105897903, -0.8634801506996155, -0.21013204753398895, -0.45784661173820496, -0.4487362205982208, 0.28386998176574707, -0.3730534613132477, 0.041474651545...
} $conn = null; if ($num_rows == 0) { echo '<div style="text-align:center;font-weight:bold;">There are no public list.</div>';} else { echo '<h1>Public Subscriber List</h1> <p>There are '.$num_rows.' list(s).</p>'; foreach ($result as $set) { try{ $sql = ' SELECT ls.SubID FROM list_sub ls,use...
[ 0.1824483871459961, -0.27141496539115906, 0.3842583894729614, -0.45824557542800903, 0.16378675401210785, 0.16585832834243774, 0.4241276681423187, -0.9067633152008057, -0.2343902587890625, -0.1080605611205101, -0.4117095470428467, 0.49021226167678833, -0.5297074913978577, -0.000526510819327...
Name</span> : <strong>'.$set['ListName'].'</strong><br><br>'; echo '<span class="label">Number of subscriber</span> : <strong>'.$numSubs.'</strong><br><br>'; echo '<span class="label">Create Date</span> : <strong>'.$set['CreateDate'].'</strong><br><br>'; echo "<button id='addtab1' class='btn'>Manage List</button>"; ech...
[ 0.1969098150730133, -0.2254275381565094, 0.6856886744499207, -0.40711429715156555, -0.05500214919447899, -0.07956235110759735, 0.14769664406776428, -0.3983200192451477, -0.07362300902605057, -0.504314124584198, -0.1788315623998642, 0.2459600418806076, 0.005058798938989639, 0.17364859580993...
I am trying to format a number, like this "123.123,00". I am using an `NSNumberFormatter`. The code is: ``` NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setGroupingSize:3]; [numberFormatter setGroupingSeparator:@"."]; [numberFormatter setUsesGroupingSeparator:YES]; [numberFo...
[ 0.32625967264175415, -0.18563272058963776, 0.6751689314842224, -0.12434714287519455, 0.32664480805397034, 0.04577362909913063, 0.2729474604129791, -0.12476903945207596, -0.2873612344264984, -0.6302294731140137, 0.132862851023674, 0.4422919750213623, 0.05865222588181496, 0.24689710140228271...
I'm looking for an event, callback or other way to tell when a CSS3 transition completes. Is this possible? Use the [`transitionend`](https://developer.mozilla.org/en/CSS/CSS_transitions#Detecting_the_completion_of_a_transition) event. Note that vendor-specific prefixes have to be added.
[ 0.24505029618740082, -0.34453731775283813, -0.029041128233075142, 0.13331489264965057, 0.0493776760995388, -0.15655530989170074, 0.14626193046569824, 0.16933299601078033, -0.380155086517334, -0.6318601369857788, -0.23070749640464783, 0.1492071896791458, -0.11932925879955292, -0.08037728071...
Lets say a have the following Model ``` public class FirstModel { public List<SecondModel> SecondModels { get; set; } } public class SecondModel { public string Value { get; set; } } ``` And this View ``` @model FirstModel .... <input name="SecondModels[0].Value" value="test1"/> <input name="SecondModels[...
[ -0.21008168160915375, -0.3692746162414551, 0.2209852635860443, -0.08440449088811874, -0.3710985779762268, 0.22827067971229553, 0.2861577570438385, -0.3674240708351135, -0.06453162431716919, -0.7657190561294556, -0.20242437720298767, 0.4133822023868561, -0.3375242352485657, 0.00513390777632...
replace the `input` names after removing the item ? Thank you very much in advance! You may use **Non-Sequential Model Binding** feature of ASP.NET MVC here. In your case, you need something as follows: ``` <input type="hidden" name="SecondModels.Index" value="0" /> <input name="SecondModels[0].Value" value="test1"/...
[ 0.09942571818828583, -0.2794607877731323, -0.16614384949207306, 0.2822592854499817, -0.1260460764169693, 0.020670359954237938, 0.11168444156646729, -0.22016490995883942, -0.37009143829345703, -0.7483097314834595, 0.005383729003369808, 0.33777621388435364, -0.23807916045188904, -0.035425961...
I have not written regular expressions before and my knowledge is woefully inadequate. I am hoping the experts here would be able to help me with a regular expression that I could use in C# to remove the markup tags only. The markup has one the following opening tags: `<AI>!` or `<AH>!` or `<AG>!` and is ended with an...
[ -0.007598587311804295, 0.24963733553886414, 0.22739334404468536, -0.008460338227450848, -0.4371332824230194, 0.5103850960731506, 0.4662553071975708, 0.1975312978029251, -0.12518784403800964, -0.4240598678588867, -0.5230557322502136, 0.4749297499656677, -0.4266273081302643, -0.2464841753244...
pitchblende, and concentrates thereof, with a uranium content of more than 5 % by weight (<AI>!Euratom!) - Monazite; urano-thorianite and other thorium ores and concentrates, with a thorium content of more than 20 % by weight (<AI>!Euratom!) - - - - -94% or more, but not more than 98.5% of a-Al<AH>!2!O<AH>!3! -2% (+...
[ 0.08144153654575348, 0.12396200746297836, -0.09351319074630737, 0.32070472836494446, -0.42658960819244385, 0.14976833760738373, 0.12083250284194946, 0.09645869582891464, 0.35429733991622925, -0.0034237252548336983, 0.03741982951760292, 0.02264362759888172, 0.17988167703151703, 0.4301279485...
at least 350 m<AG>!2!g IRON OXIDES AND HYDROXIDES; EARTH COLOURS CONTAINING 70 % OR MORE BY WEIGHT OF COMBINED IRON EVALUATED AS FE<AH>!2!O<AH>!3!: - <AI>!o!-Xylene - <AI>!m!-Xylene - <AI>!p!-Xylene - - - 1,6,7,8,9,14,15,16,17,18,18-Dodecachloropentcyclo[12.2.1.1<AG>!6,9!.0<AG>!2,13!.0<AG>!5,10!]octadeca-7,15-diene, (C...
[ -0.06616769731044769, 0.4975855350494385, 0.1723015010356903, 0.0746777206659317, -0.4165251553058624, 0.5762926936149597, 0.16092683374881744, -0.6382482051849365, 0.05380064621567726, 0.041304804384708405, -0.38214752078056335, 0.42860865592956543, -0.6045773029327393, 0.3307843208312988...
6-allyl-6,7-dihydro-5<AI>!H!-dibenz[<AI>!c,e!] azepinne (azapetine), phenindamine (INN) and their salts; imipramine hydrochloride (INNM) - Vitamin B<AH>!1! and its derivatives - Vitamin B<AH>!2! and its derivatives ``` Thank you in advance The regex to use will look for **A** followed by one of **[GHI]** enclosed in ...
[ 0.07628019154071808, 0.4865540564060211, 0.18094079196453094, -0.20107728242874146, -0.4372704327106476, 0.34149280190467834, 0.3816623389720917, -0.16596776247024536, -0.09748373180627823, 0.012333852238953114, -0.31819459795951843, 0.5437362194061279, -0.2748797833919525, 0.3809894919395...
pattern) to store the value contained within your tags, and will use it when replacing (**$1** denotes first group). ``` var r = new Regex("<A[GHI]>!(.+?)!"); var actual = r.Replace(xml, "$1"); ```
[ 0.4027244448661804, -0.30844971537590027, 0.6645374298095703, -0.20527243614196777, 0.08703897893428802, -0.1292819231748581, 0.09700695425271988, -0.5384446978569031, -0.22820529341697693, -0.5118524432182312, -0.3492272198200226, 0.3040282428264618, -0.7159375548362732, -0.07014567404985...
I'd like to unit test a SOAP client with real HTTP requests/responses to a mock service. I've seen suggestions to use WSUnit, but all the links go to "Page Not Found" <http://java.net/projects/wsunit/> What is the current industry standard to creating a mock web service for unit testing? I can recommend [soapUI](http:...
[ 0.8156152963638306, 0.20815126597881317, -0.2507655918598175, 0.05517587065696716, -0.3262171447277069, 0.05082927644252777, 0.319236695766449, -0.13554005324840546, 0.21424002945423126, -0.633540153503418, 0.45770373940467834, 0.5201734900474548, 0.17829471826553345, 0.2552213966846466, ...
I have several tags with the class `i11` all with child tags of class `i15`, I need to select a specific one of these child tags with a value `folder` (an unknown variable). To better explain here's ahtml code snippet: ``` <div class = "i11"> <input type = "text" class = "i15" style = "display: non...
[ 0.35644954442977905, 0.1554735004901886, 0.39724913239479065, -0.050086960196495056, -0.20400996506214142, 0.24022619426250458, 0.01153087429702282, -0.2878170907497406, -0.1510024070739746, -0.8194072842597961, 0.10958635807037354, 0.2915322184562683, -0.226682648062706, 0.053492199629545...
//other non-relevant html fields </div> //code above repeated 'x' amount of times ``` I have a context menu with an option that when it's selected it triggers a function and stores the value of the clicked `i11`'s `i15` value, I then need to select that specific `i15` in the function, I cannot set individual id's sin...
[ 0.207194983959198, -0.2888087034225464, 0.4776850640773773, -0.24780261516571045, 0.04811752587556839, 0.22346049547195435, 0.20379872620105743, -0.3673321306705475, -0.3559238314628601, -0.6205601692199707, -0.38648098707199097, 0.5302514433860779, -0.3754393458366394, 0.05835270881652832...
console.log("nothing :("); } } ``` Any help is greatly appreciated. EDIT: I need to select the ELEMENT or parent element itself not the value of the element by using the value retrieved and stored in `folder`, then trigger the double click event. I can recommend [soapUI](http://www.soapui.org/About-SoapUI/features...
[ 0.09147877991199493, 0.08192282915115356, 0.11579085886478424, 0.038113098591566086, 0.05016808956861496, -0.2521909475326538, 0.3304261267185211, -0.12562812864780426, 0.34977132081985474, -0.5965633392333984, 0.04030292108654976, 0.6882887482643127, -0.1581394374370575, 0.129669517278671...
All the answers I could find recommended adding display:none to css... but for a user without javascript, they will never see the element. ``` jQuery(document).ready(function($){ $('#toggleElm').hide(); $('#toggleBtn').click(function(){ $('#shareLink').slideToggle(); }) }); ``` still results i...
[ 0.181196391582489, 0.15099145472049713, 0.93309485912323, -0.11805395036935806, 0.11580754816532135, -0.18962286412715912, 0.5153434872627258, -0.27702459692955017, -0.193012997508049, -0.5127518773078918, -0.20900525152683258, 0.4354824125766754, -0.32842397689819336, 0.23637992143630981,...
class in `<html>` element and then use that class to style your elements, *exactly as html5 boilerplate+modernizr do* ``` #toggleElm { display: none; } .no-js #toggleElm { display: block; } ``` of course you have to remove that class via javascript soon in the `<head>` of your document, with a script like this ``` ...
[ -0.12452669441699982, 0.07982820272445679, 0.7983130216598511, -0.18445008993148804, -0.022884510457515717, -0.20582841336727142, 0.4199925661087036, -0.1540703922510147, -0.041278742253780365, -0.7511628866195679, -0.3208765387535095, 0.4219559133052826, -0.3254428803920746, 0.18895478546...
last CSS rule will be applied, leaving your elements visible and accessible.
[ 0.2030036598443985, -0.13521845638751984, 0.46195945143699646, 0.15701022744178772, 0.22112928330898285, -0.33635416626930237, 0.2639800012111664, -0.1052074283361435, -0.2631758451461792, -0.610352098941803, -0.3436790108680725, 0.07523693144321442, -0.04041652753949165, -0.29679447412490...
I am going to unit test a Spring MVC controller (or whole site if possible). I want to pass a URL (as a string), e.g. "/metrics/filter?a1=1&a2=2&a3=abcdefg&wrongParam=WRONG" and check what controller will return. Is there an easy way to do it? Example: ``` @RequestMapping(value = {"/filter"}, method = RequestMetho...
[ 0.4306892454624176, -0.2725127935409546, 0.5737243294715881, 0.04917820543050766, -0.0833834707736969, -0.030310144647955894, 0.39496710896492004, -0.5360481142997742, 0.16965793073177338, -0.6253323554992676, -0.052759528160095215, 0.12406844645738602, 0.02543376386165619, 0.1254461258649...
,@RequestParam(value = "onlyImmediateChildren", required = false) Boolean onlyImmediateChildren ,@RequestParam(value = "componentGroup", required = false) Long componentGroupId ,@RequestParam(value = "hasComponentGroups", required = false) Boolean hasComponentGroups ...
[ -0.03668985888361931, -0.31679943203926086, 0.5286015868186951, -0.14743921160697937, 0.008675186894834042, -0.08731405436992645, 0.25166329741477966, -0.3874133825302124, -0.1772974282503128, -0.12502983212471008, -0.22312775254249573, 0.6489235162734985, -0.462272971868515, -0.0385913252...
//some code } ``` Many thanks Maxim UPDATED * I only use GET, not post * I do not use model objects (see example above) * My system is a web service which has a lot of "/someEntity/filter?a1=123&a2=1234&a3=etc" method with various combinations of parameters. I am not sure it is practical to use model objects i...
[ 0.03905848041176796, -0.014028497040271759, 0.6134771704673767, 0.11700780689716339, -0.13167482614517212, -0.008349350653588772, 0.6726560592651367, -0.46522533893585205, -0.10268661379814148, -0.8160097599029541, -0.2137746512889862, 0.6938647031784058, -0.16412749886512756, -0.000538201...
new MockHttpServletResponse(); this.adapter = new AnnotationMethodHandlerAdapter(); } @Test public void getMetricTypes() throws Exception{ request.setRequestURI("/filter"); request.setMethod("GET"); request.setParameter("subject", "subject"); request.setParameter("area", "a...
[ 0.24093984067440033, -0.27493229508399963, 0.6251468062400818, -0.05346859246492386, -0.08924039453268051, 0.10064595937728882, 0.391548752784729, -0.5850514769554138, -0.20058394968509674, -0.6852807998657227, -0.5556409358978271, 0.3955945372581482, -0.4790317714214325, 0.025579039007425...
ModelAndView mav = adapter.handle(request, response, yourController); Assert.assertEquals(200, response.getStatus()); //Assert what you want } } ```
[ 0.16118836402893066, -0.32192838191986084, 0.6944376230239868, 0.11634644120931625, 0.09080152958631516, 0.020699653774499893, 0.37172502279281616, -0.5451353788375854, 0.01416397001594305, -0.6519771218299866, 0.011666267178952694, 0.9632180333137512, -0.2614508271217346, 0.38876000046730...
I was wondering if anyone could show me how to search this array that is in a session and see if it contains a value. I have posted the code below. Thanks you. ``` $stack = array ('hello', 'world', 'where', 'are', 'money', 'chicken', 'run'); $_SESSION['user'] = $stack; if($_SESSION['user'] does not contain('myname...
[ 0.4060717523097992, 0.1616947501897812, 0.4382147192955017, -0.21038341522216797, 0.02319505624473095, -0.028839603066444397, 0.46141189336776733, -0.38182488083839417, -0.34114333987236023, -0.43407440185546875, 0.11407580971717834, 0.590178906917572, -0.34259626269340515, 0.2166070789098...
i suggest you just do it like this? ``` session_start(); $_SESSION['user'] = array('hello', 'world', 'where', 'are', 'money', 'chicken', 'run'); if(!in_array('myname', $_SESSION['user'])) { //code to be executed if 'myname' is not in the array } else { //code to be executed if 'myname' is in the array } ...
[ 0.2580597698688507, 0.1917872279882431, 0.2757408916950226, -0.1631356179714203, 0.2629920244216919, -0.21238310635089874, 0.26682955026626587, -0.06260788440704346, -0.14904630184173584, -0.4341175854206085, -0.205266073346138, 0.6892005801200867, -0.4716640114784241, 0.2597358226776123, ...
> **Possible Duplicate:** > > [Is this a good way to generate a string of random characters?](https://stackoverflow.com/questions/976646/is-this-a-good-way-to-generate-a-string-of-random-characters) > > [How can I generate random 8 character, alphanumeric strings in C#?](https://stackoverflow.com/questions/134422...
[ -0.10853635519742966, 0.15349388122558594, 0.11508190631866455, -0.14708338677883148, -0.0587213896214962, -0.011341358534991741, 0.159323051571846, -0.14997179806232452, -0.18567407131195068, -0.35070934891700745, 0.008458012714982033, 0.26182132959365845, -0.255372554063797, 0.1410111784...
string rand5 = RandomString(5); textBox1.Text = rand1 + "-" + rand2 + "-" + rand3 + "-" + rand4 + "-" + rand5; } private static Random random = new Random((int)DateTime.Now.Ticks); private string RandomString(int Size) { StringBuilder builder = new StringBuilder(); char ch; ...
[ 0.0018186166416853666, -0.5710890889167786, 0.11082230508327484, -0.2836887240409851, 0.04702248051762581, 0.3934745490550995, 0.10055719316005707, -0.5056487321853638, -0.2750433087348938, -0.15987537801265717, 0.03004661574959755, 0.32616254687309265, -0.1127776950597763, 0.5589652061462...
{ ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65))); builder.Append(ch); } return builder.ToString(); } ``` BUT it just creates a random string of 5 chars. I want it to create a string of 5 chars and integers. How would I do this? Thanks in adv...
[ 0.24519111216068268, 0.06751982122659683, 0.34966105222702026, -0.16074775159358978, 0.11289280652999878, 0.22638854384422302, 0.04386593773961067, -0.41709110140800476, -0.1530468910932541, -0.5331919193267822, 0.33274638652801514, 0.5720232725143433, -0.15442374348640442, 0.2386656105518...
= "abcdefghijklmnopqrstuvwxyz0123456789"; var builder = new StringBuilder(); for (var i = 0; i < length; i++) { var c = pool[random.Next(0, pool.Length)]; builder.Append(c); } return builder.ToString(); } ``` Or the (inevitable) Linq solution: ``` private static string RandomStr...
[ -0.14750638604164124, -0.33870044350624084, 0.5014359354972839, -0.4216223955154419, 0.28013473749160767, 0.22602728009223938, 0.259423166513443, -0.7046722769737244, -0.19284215569496155, -0.35349521040916443, -0.25717219710350037, 0.6023547649383545, -0.3527386784553528, 0.41500085592269...
I am currently trying to build an android application that has a tabbed view with 3 activities each in a tab. The activities each access a single database however android complains that second and third tabs don't have a lock on the database (because tab 1 would have gotten it because it was started first). Does any on...
[ 0.5621470212936401, 0.07859870791435242, 0.4197728931903839, 0.191111758351326, -0.1794617921113968, 0.3422826826572418, 0.5257115960121155, -0.08752209693193436, -0.49063169956207275, -0.8538325428962708, 0.2213543951511383, 0.3718593716621399, -0.7302966713905334, 0.3420853614807129, 0...
use it. This way, neither the domain service or the factory would need to be disposable. Also, and importantly, you keep the code abstract by still injecting the implementation as opposed to hard-coding it. ``` public class UserDomainService : IUserDomainService { private readonly IRepositoryFactory RepositoryFacto...
[ 0.27440345287323, -0.1280461996793747, 0.2772601842880249, -0.15476755797863007, 0.1563229113817215, 0.07727362215518951, 0.33624467253685, -0.03155973181128502, -0.19506683945655823, -0.9268414974212646, -0.2690834701061249, 0.5209724307060242, -0.5362000465393066, 0.39996644854545593, ...
if(user != null) throw new Exception("User name already exists!"); repository.Add(user); repository.Commit(); } } } ``` You don't always have to inject the type you need. On reading up on Castle Windsor (whose mindset is register-resolve-release), you find that if you want to R...
[ 0.009143530391156673, 0.3965664803981781, 0.16803836822509766, -0.21566709876060486, 0.38320717215538025, -0.020640332251787186, 0.48427972197532654, -0.19568634033203125, -0.3552853465080261, -0.40463730692863464, -0.2676721215248108, 0.2068929523229599, -0.5013457536697388, 0.22300890088...
you will need a Repository, but don't know *when*. Instead of asking for a repository, ask for something that *creates* them. The level of abstraction is thus maintained and you have not leaked any implementation.
[ 0.6699860095977783, -0.0388023816049099, -0.10840542614459991, 0.5989459156990051, 0.16941991448402405, -0.2493526041507721, -0.00582292303442955, -0.0007197604281827807, -0.19353020191192627, -0.6198976039886475, -0.2283095270395279, 0.6489050984382629, 0.01072169654071331, -0.05902510508...
I read a post on Reddit on [Herb Stutter: JIT will never be as fast as native](http://www.reddit.com/r/programming/comments/rr2dj/herb_stutter_jit_will_never_be_as_fast_as_native/) and somebody made a comment that it was incredible somebody called Herb "misinformed" that C# uses virtual methods instead of non-virtual (...
[ -0.00358483730815351, -0.020156634971499443, -0.0371348112821579, 0.14872577786445618, -0.07094677537679672, -0.2523455321788788, 0.5466247797012329, 0.37886178493499756, -0.36005058884620667, -0.38615161180496216, 0.1015360876917839, 0.6473932862281799, -0.11337193846702576, 0.17472487688...
and tried to see. Here is my simple program: ``` namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Test t = new Test(); t.TestIt(); t.TestOut(); } } class Test {
[ 0.4867994487285614, -0.10394516587257385, -0.06761105358600616, -0.17129413783550262, 0.056249238550662994, 0.07026152312755585, 0.5283780694007874, -0.24066202342510223, 0.2151089310646057, -0.5642877817153931, -0.1451777070760727, 0.547461211681366, -0.3529830276966095, 0.233191192150115...
public Test() { } public void TestIt() { Console.WriteLine("TESTIT"); } public void TestOut() { Console.WriteLine("TESTOUT"); } } } ``` And then here is the assembly: ``` namespace ConsoleApplication1 { class
[ 0.3124275505542755, -0.056073348969221115, -0.1295836716890335, -0.0725407600402832, 0.11678934842348099, -0.03765244036912918, 0.2348703294992447, -0.3570626378059387, 0.4747081398963928, -0.6231868267059326, -0.334604948759079, 0.5647024512290955, -0.23005151748657227, 0.0524823628365993...
Program { static void Main(string[] args) { Test t = new Test(); 00000000 push ebp 00000001 mov ebp,esp 00000003 push esi 00000004 mov ecx,439E68h 00000009 call FFCE0AD4 0000000e
[ 0.21853956580162048, -0.32467880845069885, 0.5705149173736572, -0.3425464928150177, 0.13023677468299866, 0.49697938561439514, 0.4129594564437866, -0.39846059679985046, 0.0502919964492321, -0.4983730912208557, -0.07902504503726959, 0.5636646151542664, -0.3623579144477844, 0.1360295116901397...
mov esi,eax t.TestIt(); 00000010 call 704BBEB8 // Call to Console.WriteLine() 00000015 mov ecx,eax 00000017 mov edx,dword ptr ds:[02A02088h] 0000001d mov eax,dword ptr [ecx] 0000001f call dword ptr [eax+000000D8h]
[ -0.34935882687568665, 0.4195999205112457, 0.6153252124786377, -0.4055440425872803, 0.0413033552467823, 0.42765358090400696, 0.4471961259841919, -0.4817245900630951, 0.16601905226707458, -0.5366531610488892, -0.43051794171333313, 0.7769758105278015, -0.20704053342342377, -0.0945175439119339...
t.TestOut(); 00000025 call 704BBEB8 // Call to Console.WriteLine() 0000002a mov ecx,eax 0000002c mov edx,dword ptr ds:[02A0208Ch] 00000032 mov eax,dword ptr [ecx] 00000034 call dword ptr [eax+000000D8h] 0000003a pop esi } 0000003b pop ebp 000000...
[ -0.18158258497714996, 0.05421888455748558, 0.32496407628059387, -0.0011037432122975588, 0.1425739973783493, 0.24946229159832, 0.5265951752662659, -0.5166950225830078, 0.15508583188056946, -0.6149401068687439, -0.37049177289009094, 0.686671793460846, -0.13992613554000854, 0.0848010629415512...
ret ``` My question is this: by looking at the assembly how does one tell if it is using dynamic dispatch? My hunch is that it is because of these 4 instructions which resemble what I remember from my programming language class: ``` 0000002a mov ecx,eax 0000002c mov edx,dword ptr ds:[02A0208C...
[ -0.12414829432964325, 0.04305927827954292, 0.4426252841949463, -0.23274055123329163, 0.012238138355314732, 0.5326676964759827, 0.5737000107765198, -0.5892808437347412, -0.5225431323051453, -0.28520989418029785, -0.5849202871322632, 0.8913653492927551, -0.57084059715271, -0.1493621617555618...
in assuming this is dynamic dispatch? If so, are there any other tell-tale signs? If I'm wrong, how would I be able to tell if it is dynamic dispatch or not? Yes, this pattern which looks up a vtable-like thing and then uses the retrieved address to perform a function call ``` 00000032 mov eax,dword ptr [ecx...
[ -0.16536454856395721, -0.3887571394443512, 0.41068288683891296, 0.04743504896759987, -0.15756557881832123, -0.13232548534870148, 0.20289885997772217, 0.004604023415595293, -0.22742414474487305, -0.28979596495628357, -0.15972471237182617, 0.707250714302063, -0.4917050004005432, 0.1097089052...
the object type (it actually just finds the vtable pointer stored inside the object) and finds which function to call (knowing its index in the vtable). The alternative in case you already know the actual type of the object is to just call the right function directly. For example in C++: ``` class Class { public: ...
[ -0.17939259111881256, -0.19723309576511383, 0.3180474638938904, 0.03970194235444069, -0.1694914549589157, 0.026005806401371956, 0.12006118893623352, -0.13289861381053925, -0.016688499599695206, -0.5550758242607117, -0.3754514157772064, 0.7541489005088806, -0.42698612809181213, 0.2205426096...
I'm creating some custom application logs in my web application with log4net for my Azure WebRole. These are moved to blob storage every hour by the DiagnosticManager. My setup is the same as the [code sample on windowesazure.com](https://www.windowsazure.com/en-us/develop/net/common-tasks/diagnostics/#custom). When ...
[ 0.3394639194011688, 0.028886931017041206, 0.4216378331184387, 0.15379147231578827, -0.15819311141967773, -0.09730934351682663, 0.265077143907547, 0.17309758067131042, -0.11701975762844086, -1.0419763326644897, 0.15865299105644226, 0.6550514698028564, 0.1046050414443016, 0.21355491876602173...
to remote desktop into the machine and browse it there. The VHD is not accessible outside of the instance to which it is attached.
[ 0.308196485042572, -0.16317899525165558, 0.6609297394752502, 0.1719268262386322, 0.014466679655015469, -0.23115044832229614, 0.30740901827812195, 0.13261498510837555, -0.13968297839164734, -0.8252565264701843, -0.46685460209846497, 0.6374841928482056, -0.2591044008731842, 0.415167719125747...