text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
| (33us) -> this.nakResponse(m, VPL_FRAMELENGTH) //RemoveParameterSet 3 | (34us) -> this.nakResponse(m, VPL_FRAMELENGTH) //ActivateParameterSet 3
[ -0.533532440662384, -0.12767907977104187, 0.49918249249458313, -0.25913771986961365, -0.3699634075164795, 0.2143474966287613, 0.4927298128604889, -0.5933830142021179, -0.4848347008228302, -0.33595943450927734, -0.2506544589996338, 0.07554449141025543, -0.7412759065628052, -0.28488853573799...
| (35us) -> this.nakResponse(m, VPL_FRAMELENGTH) //GetParameterSet 3 | (41us) -> this.nakResponse(m, VPL_FRAMELENGTH) //StartSelfTest
[ -0.8668562769889832, -0.36574360728263855, 0.5119544267654419, 0.10515718907117844, -0.21320657432079315, 0.2539719045162201, 0.4399934709072113, -0.3910585641860962, -0.5579455494880676, -0.79041588306427, -0.3222755193710327, 0.05313422903418541, -0.23827974498271942, -0.0654218643903732...
0 | (42us) -> this.returnStatus(m) //GetStatus 0 | (43us) -> this.nakResponse(m, VPL_FRAMELENGTH)
[ -0.4890526831150055, -0.2454988658428192, 0.18145890533924103, -0.09634386003017426, 0.027604416012763977, 0.4905789792537689, 0.5608830451965332, -0.3516792953014374, -0.4670994281768799, -0.48195216059684753, -0.3516882061958313, 0.07707434147596359, -0.36050134897232056, 0.0943588539958...
//GetStatusDetail 0 | (44us) -> this.ResetStatus(m) //ResetStatus 5
[ -0.2582411468029022, -0.2703486680984497, 0.42122772336006165, -0.14789170026779175, 0.3311242461204529, 0.29246869683265686, 0.4592229723930359, -0.28583255410194397, -0.3121645152568817, -0.6712351441383362, -0.42193517088890076, 0.2685672640800476, -0.13390201330184937, 0.04305967316031...
| (45us) -> this.nakResponse(m, VPL_FRAMELENGTH) //SetDateTime 6 | (46us) -> this.nakResponse(m, VPL_FRAMELENGTH) //GetDateTime
[ -0.04652528092265129, -0.3900613486766815, 0.5753951668739319, -0.03410346806049347, -0.016053495928645134, 0.27554500102996826, 0.5423039197921753, -0.4098472595214844, -0.4789098799228668, -0.8154475688934326, -0.40753886103630066, 0.24719783663749695, -0.22362419962882996, 0.07918825745...
0 | _ -> this.nakResponse(m, VPL_REQUESTNOTSUPPORTED) (* The various responses follow *) //Generate a NAK response member private this.nakResponse (message : Message , error) = controller.Status <- controller.Status ||| ControllerStatus.Nak let intro = new MessageIntro() in...
[ -0.6915646195411682, -0.4581901431083679, 0.22615955770015717, 0.027815183624625206, -0.26274219155311584, 0.22774457931518555, 0.3517780303955078, -0.2513003945350647, -0.4234984517097473, -0.5362377166748047, -0.18827994167804718, 0.010900474153459072, -0.3898288607597351, 0.463847517967...
intro.SequenceNumber <- this.setHigh(message.Intro.SequenceNumber) intro.MessageGroup <- MESSAGE_GROUP intro.MessageType <- 130us let errorBytes = UShortExtender.ToIntelOrderedByteArray(error) let data = Array.zero_create(5) let x = this.getStatusBytes let y = this.getSta...
[ 0.029424764215946198, 0.12117663025856018, 0.27628976106643677, -0.1824636608362198, 0.3128102421760559, 0.1211758553981781, 0.4716397523880005, -0.06678798049688339, -0.15653355419635773, -0.567724347114563, -0.42331305146217346, 0.5471261739730835, -0.43905898928642273, 0.336414396762847...
let header = this.buildHeader intro data let message = new Message() message.Header <- header message.Intro <- intro message.Tail <- TAIL_BYTE message.Data <- data message //Generate an ACK response member private this.ackResponse (message : Message) =
[ -0.061528511345386505, -0.12145569920539856, 0.34591183066368103, -0.15240710973739624, -0.17228840291500092, -0.17530468106269836, 0.2757156491279602, -0.590003252029419, 0.0037853808607906103, -0.3786984980106354, -0.30567556619644165, 0.3824361264705658, -0.469240665435791, 0.0793736204...
let intro = new MessageIntro() intro.MessageGroupVersion <- MESSAGE_GROUP_VERSION intro.Address <- message.Intro.Address intro.SequenceNumber <- this.setHigh(message.Intro.SequenceNumber) intro.MessageGroup <- MESSAGE_GROUP intro.MessageType <- 129us let data = Array.zero...
[ -0.09038272500038147, -0.12164187431335449, 0.3668481111526489, -0.34906134009361267, 0.07914964854717255, 0.053817637264728546, 0.33147960901260376, -0.27802371978759766, -0.20276665687561035, -0.5477803349494934, -0.36267179250717163, 0.5376926064491272, -0.633019745349884, 0.11004244536...
let header = this.buildHeader intro data message.Header <- header message.Intro <- intro message.Tail <- TAIL_BYTE message.Data <- data message //Generate a ReturnFirmwareVersionList member private this.firmwareVersionListResponse (message : Message) = //...
[ 0.3009405732154846, -0.03390337899327278, 0.4936577379703522, -0.37669458985328674, -0.09804175794124603, -0.4148992896080017, 0.1611124724149704, -0.49390721321105957, 0.006649691611528397, -0.22808526456356049, -0.02603643760085106, 0.4642305374145508, -0.4184727370738983, -0.04432329535...
this.nakResponse(message,VPL_INVALID) else let intro = new MessageIntro() intro.MessageGroupVersion <- MESSAGE_GROUP_VERSION intro.Address <- message.Intro.Address intro.SequenceNumber <- this.setHigh(message.Intro.SequenceNumber) intro.MessageGroup <-...
[ -0.3659985065460205, 0.027983488515019417, 0.3190000355243683, -0.32944750785827637, -0.20970703661441803, 0.08601850271224976, 0.33343416452407837, -0.08812376856803894, -0.40539392828941345, -0.3780229091644287, -0.34930282831192017, 0.31015893816947937, -0.5176878571510315, 0.2424590140...
intro.MessageType <- 132us let firmwareVersions = controller.ReturnFirmwareVersionList(); let firmwareVersionBytes = BitConverter.GetBytes((uint16)firmwareVersions.Count) |> Array.rev //Create the data let data = Array.zero_create(3 + (int)firmwareVersions.Count * 27...
[ 0.13199706375598907, -0.3703729808330536, 0.40426379442214966, -0.06039535626769066, 0.15741685032844543, 0.2632206380367279, 0.21748147904872894, -0.3461170792579651, -0.13830028474330902, -0.50808185338974, -0.04170355200767517, 0.5283022522926331, -0.565338671207428, 0.2753031849861145,...
//drcode data.[1..2] <- firmwareVersionBytes //Number of firmware versions let mutable index = 0 let loops = firmwareVersions.Count - 1 for i = 0 to loops do
[ 0.3725258409976959, -0.20709995925426483, 0.3817773759365082, 0.033941708505153656, 0.0866612046957016, -0.03721849247813225, 0.20084227621555328, -0.2675468325614929, -0.39416131377220154, -0.36045846343040466, -0.01742461696267128, 0.3726068139076233, -0.31891533732414246, 0.290350317955...
let nameBytes = ASCIIEncoding.ASCII.GetBytes(firmwareVersions.[i].Name) |> Array.rev let timestampBytes = this.getTimeStampBytes firmwareVersions.[i].Timestamp |> Array.rev let sizeBytes = BitConverter.GetBytes(firmwareVersions.[i].Size) |> Array.rev data.[index + 3 .. ...
[ -0.05781310051679611, -0.15119315683841705, 0.45977693796157837, -0.013402437791228294, 0.12630362808704376, 0.18904313445091248, 0.20279952883720398, -0.3760744333267212, -0.39507684111595154, -0.7181974053382874, -0.4754351079463959, 0.35056382417678833, -0.3555128276348114, 0.4748931229...
data.[index + 11 .. index + 24] <- timestampBytes data.[index + 25 .. index + 28] <- sizeBytes data.[index + 29] <- firmwareVersions.[i].Status index <- index + 27 let header =
[ 0.18247713148593903, -0.08121678978204727, 0.311014324426651, -0.06958291679620743, 0.08238096535205841, -0.1998966634273529, -0.03044716641306877, -0.2543434798717499, -0.3931811451911926, -0.49840638041496277, -0.25685611367225647, 0.3219476640224457, -0.28695887327194214, 0.194365754723...
this.buildHeader intro data message.Header <- header message.Intro <- intro message.Data <- data message.Tail <- TAIL_BYTE message //Generate ReturnStatus member private this.returnStatus (message : Message) = //Validation
[ 0.23426564037799835, -0.0095452219247818, 0.1417052447795868, -0.19546857476234436, -0.12002766877412796, -0.30737799406051636, 0.3250872790813446, -0.3780766725540161, 0.13813737034797668, -0.41472503542900085, -0.16033034026622772, 0.4121191203594208, -0.48335665464401245, 0.098082706332...
if message.Data.[0] <> 0x00uy then this.nakResponse(message,VPL_INVALID) else let intro = new MessageIntro() intro.MessageGroupVersion <- MESSAGE_GROUP_VERSION intro.Address <- message.Intro.Address intro.SequenceNumber <- this.setHigh(message.Intro.Seq...
[ -0.3037673234939575, -0.0945880264043808, 0.3977747857570648, -0.3700505495071411, -0.05413953587412834, 0.0946863517165184, 0.2242623120546341, -0.10920996218919754, -0.3594857156276703, -0.3717837929725647, -0.31149527430534363, 0.32419687509536743, -0.48459720611572266, 0.32068511843681...
intro.MessageType <- 131us let statusDetails = controller.ReturnStatus(); let sizeBytes = BitConverter.GetBytes((uint16)statusDetails.Length) |> Array.rev let detailBytes = ASCIIEncoding.ASCII.GetBytes(statusDetails) |> Array.rev let data = Array.zero_create(statusDet...
[ 0.030484585091471672, -0.5027675628662109, 0.3979267179965973, 0.1258794665336609, 0.3684561550617218, 0.2092071920633316, 0.2172214537858963, -0.28543540835380554, -0.2864982485771179, -0.5693700313568115, -0.17511260509490967, 0.4774257242679596, -0.26426705718040466, 0.30814340710639954...
data.[1..2] <- this.getStatusBytes data.[3..4] <- sizeBytes //Details size data.[5..5 + statusDetails.Length - 1] <- detailBytes let header = this.buildHeader intro data message.Header <- header message.Intro <- intro message.Data <-
[ 0.431596040725708, -0.031004121527075768, 0.3913896381855011, 0.03392917290329933, 0.29864397644996643, -0.23044247925281525, 0.13103432953357697, -0.2713097929954529, -0.13215017318725586, -0.7866401076316833, -0.4140305817127228, 0.5165868401527405, -0.0865001454949379, 0.039026003330945...
data message.Tail <- TAIL_BYTE message //Reset some status bytes member private this.ResetStatus (message : Message) = if message.Data.[0] <> 0x05uy then this.nakResponse(message, VPL_INVALID) else
[ -0.22489666938781738, -0.419247567653656, 0.3095164895057678, 0.1562112718820572, 0.12708432972431183, 0.30199649930000305, 0.2543674409389496, -0.15283791720867157, -0.5766787528991699, -0.3785013258457184, 0.03773226588964462, 0.2941076457500458, -0.3775486648082733, 0.2464957982301712, ...
let flagBytes = message.Data.[1..2] |> Array.rev let flags = Enum.ToObject(typeof<ControllerStatus>,BitConverter.ToInt16(flagBytes,0)) :?> ControllerStatus let retVal = controller.ResetStatus flags if retVal <> 0x00us then this.nakResponse(message,retVal) ...
[ -0.3288337290287018, -0.4421911835670471, 0.4545370042324066, 0.19243451952934265, 0.07514432817697525, 0.1699400693178177, 0.4163573086261749, -0.5375081896781921, -0.6929877996444702, -0.4845317304134369, -0.2343442142009735, 0.0598071813583374, -0.4671686887741089, 0.0888507142663002, ...
//StartLoadingFirmwareVersion (Ack/Nak) member private this.StartLoadingFirmwareVersion (message : Message) = if (message.Data.[0] <> 0x01uy) then this.nakResponse(message, VPL_INVALID) else //Analyze the data let name = message.Data.[1..8] |> Array.rev |> ASCIIEn...
[ -0.22287432849407196, -0.2540479898452759, 0.34004858136177063, 0.06956804543733597, -0.2651154100894928, 0.044424328953027725, 0.3175153434276581, -0.38892605900764465, -0.6416484117507935, -0.4874321520328522, -0.17239651083946228, 0.2943647503852844, -0.39709916710853577, 0.189015269279...
x -> ASCIIEncoding.ASCII.GetBytes(x.ToString()).[0]) |> Seq.to_array |> ASCIIEncoding.ASCII.GetString let timestamp = DateTime.ParseExact(text,"yyyyMMddHHmmss",Thread.CurrentThread.CurrentCulture) let size = BitConverter.ToUInt32(message.Data.[23..26] |> Array.rev,0) let overwrite =...
[ -0.009735745377838612, -0.1263875961303711, 0.5560225248336792, -0.22522729635238647, 0.3861114978790283, 0.11947431415319443, 0.3605794310569763, -0.2986566424369812, -0.2939094305038452, -0.4993651509284973, -0.07352710515260696, 0.25917789340019226, -0.18160276114940643, 0.4455219805240...
| _ -> true //Create a FirmwareVersion instance let firmware = new FirmwareVersion(); firmware.Name <- name firmware.Timestamp <- timestamp firmware.Size <- size let retVal = controller.StartLoadingFirmwareVersion(firmware,overwrite)
[ 0.2842603921890259, -0.10698579996824265, 0.6349428296089172, -0.08773935586214066, -0.007490881718695164, 0.018384991213679314, 0.21918563544750214, -0.3776495158672333, -0.29833751916885376, -0.526479184627533, -0.20451930165290833, 0.495085746049881, -0.4910453259944916, 0.3209411799907...
if retVal <> 0x00us then this.nakResponse(message, retVal) //The controller denied the request else this.ackResponse(message); //LoadFirmwareVersionBlock (ACK/NAK) member private this.LoadFirmwareVersionBlock (message : Message) = if message.Data.[0] <> 0x02u...
[ -0.2549170255661011, -0.33574017882347107, 0.4851970970630646, 0.13480229675769806, -0.2169632762670517, 0.1484336107969284, 0.35711807012557983, -0.5173425674438477, -0.4987971782684326, -0.22253231704235077, -0.2632891833782196, 0.05933545157313347, -0.4952997863292694, 0.362367838621139...
this.nakResponse(message, VPL_INVALID) else //Analyze the data let lastBlock = match message.Data.[1] with | 0x00uy -> false | _true -> true
[ -0.266601026058197, -0.14609727263450623, 0.28652092814445496, 0.007721881382167339, -0.1353299468755722, 0.012424864806234837, 0.4792945981025696, -0.36261576414108276, -0.3257589042186737, -0.41498881578445435, -0.10738051682710648, 0.06828666478395462, -0.17629453539848328, 0.1683837324...
let blockNumber = BitConverter.ToUInt16(message.Data.[2..3] |> Array.rev,0) let blockSize = BitConverter.ToUInt16(message.Data.[4..5] |> Array.rev,0) let blockData = message.Data.[6..6 + (int)blockSize - 1] |> Array.rev let retVal = controller.LoadFirmwareVersionBlock(la...
[ 0.0883961021900177, -0.4640962481498718, 0.8300184607505798, -0.05399232357740402, 0.15643803775310516, 0.0674247294664383, 0.2770845890045166, -0.538214385509491, -0.3475983440876007, -0.5252026319503784, -0.30523961782455444, 0.5030446648597717, -0.44088903069496155, 0.25122684240341187,...
this.nakResponse(message, retVal) else this.ackResponse(message) (* Helper methods *) //We need to convert the DateTime instance to a byte[] understood by the device "yyyymmddhhmmss" member private this.getTimeStampBytes (date : DateTime) = let stringNumberToByte s = Byt...
[ -0.08955740183591843, -0.12757863104343414, 0.3852590322494507, -0.03277174010872841, 0.07093216478824615, 0.02034652605652809, 0.3711516261100769, -0.12928320467472076, -0.4354698359966278, -0.5163428783416748, -0.15953902900218964, 0.2189762145280838, -0.1009938195347786, 0.2325191646814...
let yearString = date.Year.ToString("0000") let monthString = date.Month.ToString("00") let dayString = date.Day.ToString("00") let hourString = date.Hour.ToString("00") let minuteString = date.Minute.ToString("00") let secondsString = date.Second.ToString("00") let y1 =...
[ 0.015947777777910233, -0.10977333039045334, 0.5723559856414795, -0.36062684655189514, 0.3443381190299988, 0.05495487526059151, -0.19586187601089478, -0.10935145616531372, -0.3772565424442291, -0.3432671129703522, -0.40282967686653137, 0.1634415090084076, 0.2166108787059784, 0.2896681129932...
let y4 = stringNumberToByte yearString.[3] let m1 = stringNumberToByte monthString.[0] let m2 = stringNumberToByte monthString.[1] let d1 = stringNumberToByte dayString.[0] let d2 = stringNumberToByte dayString.[1] let h1 = stringNumberToByte hourString.[0] let h2 = str...
[ -0.32021448016166687, 0.009276061318814754, 0.6005188822746277, -0.2026074081659317, 0.22269056737422943, 0.22972607612609863, -0.32452908158302307, -0.08456243574619293, -0.27867770195007324, -0.34668636322021484, -0.6914749145507812, 0.3927901089191437, 0.16310444474220276, 0.36726805567...
let min2 = stringNumberToByte minuteString.[1] let s1 = stringNumberToByte secondsString.[0] let s2 = stringNumberToByte secondsString.[1] [| y1 ; y2 ; y3 ; y4 ; m1 ; m2 ; d1 ; d2 ; h1 ; h2 ; min1 ; min2 ; s1; s2 |] //Sets the high bit of a byte to 1 member private this.setHigh (b : by...
[ -0.32780542969703674, -0.16871832311153412, 0.2389025092124939, -0.15781112015247345, 0.21518124639987946, 0.046760305762290955, 0.14121320843696594, -0.4148120880126953, -0.15919910371303558, -0.07822218537330627, -0.4415473937988281, 0.47699835896492004, -0.13348141312599182, 0.175524055...
let array = new BitArray([| b |]) array.[7] <- true let mutable converted = [| 0 |] array.CopyTo(converted, 0); (byte)converted.[0] //Build the header of a Message based on Intro + Data member private this.buildHeader (intro : MessageIntro) (data : byte[]) = let headerLe...
[ 0.20827578008174896, -0.2861939072608948, 0.5283289551734924, -0.3228168189525604, 0.05359558016061783, -0.10641773790121078, 0.4379190504550934, -0.4514511227607727, -0.148534893989563, -0.3838677704334259, -0.14447784423828125, 0.6333515644073486, -0.5349794626235962, 0.3934721350669861,...
let length = (uint16)(headerLength + introLength + data.Length) let crcData = ByteArrayExtender.Concat(intro.GetRawData(),data) let crcValue = ByteArrayExtender.CalculateCRC16(crcData) let lengthBytes = UShortExtender.ToIntelOrderedByteArray(length); let crcValueBytes = UShortExtender.To...
[ -0.17815524339675903, -0.06258758902549744, 0.5670806765556335, -0.13897685706615448, 0.03500152379274368, 0.09394663572311401, 0.11651348322629929, -0.300373375415802, -0.2617030739784241, -0.47234073281288147, -0.3014579713344574, 0.4831704795360565, -0.23243831098079681, 0.3785631954669...
header.Length <- length header.HeaderChecksum <- headerChecksum header.DataChecksum <- crcValue header member private this.getStatusBytes = let l = controller.Status let status = (uint16)controller.Status let statusBytes = BitConverter.GetBytes(status); statu...
[ 0.15670369565486908, -0.33874988555908203, 0.3955003023147583, 0.19673296809196472, 0.32421407103538513, 0.07857400178909302, 0.03277655318379402, -0.20316699147224426, -0.30331408977508545, -0.6510244011878967, -0.21750862896442413, 0.431991308927536, -0.19340187311172485, 0.4452889263629...
hoping for suggestions, ways to improve the code or even different ways to handle the problem. For example, would the use of a dynamic language such as IronPython make things easier, am I going at the the wrong way all together. What's your experience with problems like this, what would you change, avoid, etc.... **Up...
[ 0.16714826226234436, -0.11911766976118088, 0.2159191220998764, 0.08766469359397888, 0.2267162799835205, 0.26358526945114136, 0.3966621160507202, -0.2532050311565399, -0.2179177701473236, -0.6482676267623901, 0.07642768323421478, 0.35776421427726746, -0.23944194614887238, -0.071227237582206...
Font : string ; Alignment : byte ; Scroll : byte ; Flash : byte} type DrCode12Item = {Id : byte ; X : uint16 ; Y : uint16 ; SizeX : uint16 ; SizeY : uint16} type DrCode14Item = {X : byte ; Y : byte} type DRType = | DrCode0 of byte | DrCode1 of byte * string * DateTime * uint32 * byte | DrCode2 of byte * byte * uint16 ...
[ -0.3650438189506531, 0.0890529677271843, 0.47492846846580505, -0.21047261357307434, -0.15700936317443848, 0.18437714874744415, 0.1706041842699051, -0.4059147536754608, -0.1256990283727646, -0.7131384611129761, -0.36301660537719727, 0.251740425825119, -0.2730640769004822, -0.224385589361190...
* DateTime * byte * uint16 * array<byte> | DrCode5 of byte * uint16 | DrCode6 of byte * DateTime | DrCode7 of byte * uint16 * uint16 | DrCode8 of byte * uint16 * uint16 * uint16 * array<byte> | DrCode9 of byte * uint16 * array<DrCode9Item> | DrCode10 of byte * string * DateTime * uint32 * byte * array<byte> | DrCode11 ...
[ -0.20742754638195038, 0.0856320783495903, 0.6090199947357178, -0.39748311042785645, 0.016201583668589592, -0.06388776004314423, -0.04796285927295685, -0.392889142036438, -0.3151087760925293, -0.6127342581748962, -0.004489523824304342, 0.39198482036590576, -0.29565000534057617, -0.080798469...
I still don't understand how that would help me. I've read about it on Wikibooks and in Foundations of F# but something is not clicking in my head yet. **Update 2** So, I understand I could do the following: ``` let execute dr = match dr with | DrCode0(drCode) -> printfn "Do something" | DrCode1(drCode, ...
[ 0.12044422328472137, -0.1320216804742813, 0.5129901766777039, -0.3069484233856201, 0.03251179680228233, 0.0645502507686615, -0.02985459193587303, -0.21163465082645416, -0.2103712409734726, -0.9263635873794556, -0.040571484714746475, 0.4038267433643341, -0.1689056158065796, 0.20948553085327...
of message it is and the proper function is then called. The above would just be additional code, at least that is how understand it, so I must really be missing the point here... but I don't see it. ``` execute x ``` Go to Tools->Import and Export Settings, then "Reset all settings". The New Project menu option then...
[ 0.1429431140422821, -0.09634829312562943, 0.4321938753128052, -0.03290224075317383, 0.07852520048618317, -0.13511371612548828, 0.48270076513290405, 0.29159054160118103, 0.013165582902729511, -0.6785746812820435, -0.5411311388015747, 0.7960090041160583, -0.292121022939682, 0.127750307321548...
I need to open programatically a certain tab in my tab bar. I tried calling the following method from my UITabBarController: ``` self.selectedViewController = myVController; ``` Which doesn't work. What is the right way to open a tab? Thank you. Update: I tried the following code: ``` self.selectedViewControlle...
[ -0.23323985934257507, 0.0894375666975975, 0.585568904876709, -0.028964800760149956, -0.014501231722533703, 0.008819455280900002, 0.42859742045402527, -0.17101943492889404, -0.01407498400658369, -0.7684558629989624, -0.13057176768779755, 0.7287114858627319, -0.22628411650657654, -0.06427502...
a view controller that is > not visible in the tab bar, but is > instead managed by the More navigation > controller, has no effect. Perhaps this was your problem? One possible workaround is to use your own `UITabBar` and handle your own views. Then you can do something like this: ``` [tabBar setSelectedItem:[tab...
[ -0.05257079750299454, -0.3846818506717682, 0.5988309979438782, 0.1684042066335678, -0.3701407015323639, -0.0949174165725708, 0.1547064483165741, -0.11843112856149673, -0.31816622614860535, -0.6331278085708618, 0.01093327533453703, 0.6656168699264526, -0.4665067493915558, 0.2557232081890106...
I'm aiming to learn about concurrency in Java. Currently my state of knowledge is poor. I'm pretty sure I know what "volatile" means. I sort of know what "synchronized" means. Sometimes. I've never written code that starts threads or manages them. Outside of this issue, I feel confident and at home working in Java. I'...
[ 0.5097441673278809, 0.24813896417617798, 0.036356184631586075, 0.032788872718811035, -0.16070523858070374, -0.18888820707798004, 0.11880946159362793, 0.23672358691692352, -0.7746202349662781, -0.37020930647850037, 0.3729833662509918, 0.7152072191238403, -0.18879090249538422, 0.355452537536...
the problem :-)
[ -0.34122374653816223, 0.25124526023864746, 0.2812139391899109, 0.08312760293483734, -0.08973248302936554, 0.2217850387096405, 0.028590651229023933, -0.34194374084472656, -0.17419306933879852, -0.38719940185546875, -0.29848605394363403, 0.5557019114494324, -0.22217483818531036, 0.2805815041...
I am totally new to the subject of cron jobs so I have no idea where to start learning about them; when, why, or how to use them with my Zend Framework application, or PHP in general. Can anyone explain the process, with an example, or recommend some good resources to get started? Cron jobs is a mechanism to automate ...
[ 0.10311717540025711, 0.24279174208641052, -0.059230439364910126, 0.19984106719493866, -0.24405643343925476, -0.14166297018527985, 0.10854347050189972, 0.1716780960559845, -0.31742992997169495, -0.5823999643325806, 0.25681862235069275, 0.8064572215080261, -0.1806803047657013, -0.27793547511...
"how to set up cron job" revealed this link at the top: <http://www.adminschoice.com/docs/crontab.htm> I'm sure this article will help you. P.S. As a command to execute you should put something like: `/usr/local/bin/php -f <path_to_your_php_script>` where the first path is the full path to your php cli executable...
[ 0.2837379574775696, 0.27506712079048157, 0.5512423515319824, -0.050995245575904846, 0.21353213489055634, -0.075876884162426, 0.06930943578481674, 0.03257275000214577, -0.24714505672454834, -0.7265101671218872, -0.17674972116947174, 0.8826376795768738, -0.024745939299464226, -0.065736219286...
I want to retrieve the HTML code of a link (web page) in PHP. For example, if the link is <https://stackoverflow.com/questions/ask> then I want the HTML code of the page which is served. I want to retrieve this HTML code and store it in a PHP variable. How can I do this? If your PHP server allows url fopen wrappers...
[ 0.23586887121200562, 0.08588813990354538, 0.868453323841095, 0.02917562797665596, 0.027506684884428978, -0.24087338149547577, 0.10075432062149048, -0.24308258295059204, -0.15371160209178925, -0.479360431432724, -0.1979532688856125, 0.5281311273574829, -0.3326760530471802, 0.151394769549369...
I heard somewhere that Microsoft will be focusing their efforts on C# rather than C++ for the .NET platform. I can see signs of this being true because of the GUI designer that was available for C# but not C++. So I would like to know if C++ in .NET is dying and if it will continue to be second to C# in the future. If...
[ 0.23693756759166718, 0.042259328067302704, 0.050311360508203506, 0.16410820186138153, -0.24886074662208557, -0.021156569942831993, -0.13160334527492523, 0.384914755821228, -0.36310404539108276, -0.6798735857009888, 0.07473413646221161, 0.4869629144668579, -0.2333391159772873, 0.26169618964...
allow developers to bridge native and managed code. However do not confuse C++ with C++/CLI (C++ .NET is the same thing...). C++ is alive and well in areas such as the kernel, games, high-performance and server apps (e.g. SQL server) all of which are unlikely to change. On the other hand most .NET 'GUI stuff' won't us...
[ 0.05442878603935242, 0.12711305916309357, 0.2950661778450012, 0.29581671953201294, -0.16886010766029358, -0.4215471148490906, -0.011126857250928879, 0.3863096237182617, -0.2057560384273529, -0.8886370658874512, -0.04745883494615555, 0.596459150314331, -0.23428085446357727, -0.1243116259574...
I use Javascript on frontend, C# as middle layer and Oracle 9i as DB. What is the best practice when formatting numbers with 2 decimal precision into a currency? And what layers should be preferred amongst any of these three layers? Keeping in mind that the User will be able to edit these amounts on a few of my scree...
[ 0.37599843740463257, 0.44756031036376953, 0.023398051038384438, 0.11318541318178177, -0.5121442079544067, 0.19337406754493713, -0.12864938378334045, -0.051904045045375824, -0.08233949542045593, -0.6031902432441711, 0.40128564834594727, 0.4226595461368561, 0.0700424388051033, -0.10167291760...
your ASP.NET code, to display it based on your user's locale/cultureinfo. For your gridviews and other display controls, in C#, you can use the string formatting option: `{0:c}` to display the currency with the correct symbol and 2 decimal places.
[ 0.3196222186088562, -0.1679982990026474, 0.4795420169830322, 0.24147625267505646, 0.03537842631340027, 0.26071682572364807, -0.07501722872257233, 0.050881754606962204, -0.34122249484062195, -0.6007967591285706, 0.054307498037815094, 0.14258788526058197, -0.08851159363985062, -0.32751816511...
Essentially the title of this question explains the essense of what I am trying to do, but to create a contrived example... I have a class, call it Employee. Employee has an IPaymentBehaviour... ``` public class Employee { IPaymentBehaviour _paymentBehaviour; protected internal Employee() { /* required by NH */...
[ -0.23709240555763245, 0.2805807292461395, 0.07417070120573044, -0.18312054872512817, 0.16895227134227753, 0.23695062100887299, 0.06683303415775299, -0.3267423212528229, 0.1467774361371994, -0.6577020883560181, -0.1651916205883026, 0.4057038724422455, -0.1260291188955307, 0.2046022415161132...
Depending on the value of PaymentBehaviourId I need to 'inject' a different implementation of IPaymentBehaviour into the Employee object. Depending on which PaymentBehaviour was in use, Field1, 2, 3 or 4 might be needed to create that behaviour. Can anyone tell me how this would be mapped using Fluent-NHibernate? tabl...
[ -0.39255717396736145, -0.02604300156235695, 0.22514155507087708, -0.2398199439048767, -0.04558095335960388, 0.3892209529876709, 0.11305250227451324, -0.2649132013320923, 0.041461918503046036, -0.5472936630249023, -0.09389356523752213, 0.7156422138214111, -0.29592451453208923, 0.08372550457...
set; } } public class PaymentBehaviourB : IPaymentBehaviour { /* ... */ public int Field2 { get; set; } } ``` I don't know FluentNHibernate enough to tell you how it looks like, but in XML you would specify it like this: ``` <class name="Employee" table="Employees"> <many-to-one name="PaymentBehaviour" clas...
[ -0.1150151863694191, -0.038578517735004425, 0.49378547072410583, -0.2104180008172989, -0.016407931223511696, 0.3003460764884949, -0.037318143993616104, -0.31966206431388855, 0.2151108682155609, -0.7106238007545471, -0.21654677391052246, 0.7797900438308716, -0.18064038455486298, 0.050254683...
Duplicate of: * [Why not use tables for layout in HTML?](https://stackoverflow.com/questions/83073/div-vs-table) * [DIV’s vs Tables or CSS vs. Being Stupid](https://stackoverflow.com/questions/61250/divs-vs-tables-or-css-vs-being-stupid) --- Theres been a lot of talk lately about rather using div than table tags to...
[ 0.32811418175697327, 0.08536513894796371, 0.18466421961784363, 0.31145161390304565, -0.22288280725479126, -0.32264336943626404, 0.21813154220581055, 0.12524358928203583, -0.35489320755004883, -0.6895120739936829, 0.05114530399441719, 0.22470341622829437, -0.5866564512252808, -0.01081716082...
maintain. you don't have to write `<table><tr><td>Text here</td></tr></table>` every time you want to say something when you can just write `<div>Text here</div>` instead. you can add css hooks (ie, classes or elements) to both tables and divs, but with divs it is infinitely more flexible. 3) table structured sites ar...
[ 0.4812525808811188, 0.05875132977962494, 0.4481814503669739, 0.12698885798454285, -0.2119935303926468, -0.4851453900337219, 0.5696030259132385, 0.25416454672813416, -0.2180907279253006, -0.6767033934593201, -0.0033748566638678312, 0.6456915140151978, -0.30071255564689636, 0.002363833365961...
For my c# mobile application developed with visual studio 2008, i am trying to use the FTP. FTP works fine from the real device, but it does not work when i use the device emulator: the connection is successful, but it failed when attenpting to retrieve data. Both use windows mobile 5. Did some of you already had this...
[ 0.029464971274137497, 0.1760442554950714, 0.7614275813102722, -0.18361026048660278, -0.1084507554769516, 0.0649164617061615, 0.3957120180130005, -0.0180324986577034, -0.45705077052116394, -0.6118584275245667, 0.04316151887178421, 0.6399109363555908, -0.49482619762420654, -0.301636934280395...
0.9.31 beta (000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 220 FTP server (000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> USER aa (000001) 04/05/2009 09:50:59 - (not logged in) (127.0.0.1)> 331 Password required for aa (000001) 04/05/2009 09:51:00 - (not logged in) (127.0.0.1)> PASS \*\* (...
[ -0.18851473927497864, 0.007738639134913683, 0.6371121406555176, -0.11701995879411697, -0.03161151707172394, 0.04007505252957344, 0.8476312756538391, -0.04420263320207596, -0.29338204860687256, -0.4684367775917053, -0.09303926676511765, 0.7315661907196045, -0.3550356924533844, 0.04090711474...
worked with this mobile stuff, so i have no real solution, but maybe some explanation. As you can see the problem occurs right after entering the passive mode. As you can see the used ip address is 127.0.0.1 which is even be communicated for the passive mode (with the used ports). I think that the emulated network sta...
[ 0.42814403772354126, -0.06569046527147293, 0.4613334834575653, 0.16674117743968964, 0.009147894568741322, -0.4994111657142639, 0.40913987159729004, 0.0017651192611083388, -0.5600862503051758, -0.7275934815406799, 0.12294761836528778, 0.5549338459968567, -0.29011353850364685, 0.132754758000...
and trying to examine what excactly goes wrong. But that would any work if you have any deeper knowledge about tcp ip and all this stuff.
[ 0.3694950044155121, 0.0857023075222969, 0.03962491825222969, 0.30965375900268555, -0.135987788438797, -0.3484879434108734, 0.3616284132003784, 0.23943907022476196, -0.07348573207855225, -0.319131463766098, 0.19903744757175446, 0.49744129180908203, 0.0635983794927597, 0.26163753867149353, ...
The following code produces random values for both n and v. It's not surprising that n is random without being properly protected. But it is supposed that v should finally be 0. Is there anything wrong in my code? Or could anyone explain this for me? Thanks. I'm working on a 4-core server of x86 architecture. The unam...
[ 0.1573019027709961, -0.028795568272471428, 0.44123461842536926, -0.0962611511349678, -0.36255791783332825, 0.012145809829235077, 0.3007769286632538, -0.17806249856948853, -0.3166552484035492, -0.3928576707839966, 0.09903737157583237, 0.5331369042396545, -0.30981332063674927, 0.299035787582...
i < LOOP; i++) { // pthread_mutex_lock(&mutex); ++n; --n; atomic_inc(&v); atomic_dec(&v); // pthread_mutex_unlock(&mutex); } return NULL; } #define COUNT 50 int main(int argc, char **argv) { int i; pthread_t pids[COUNT]; pthread_attr_t attr; pthre...
[ 0.055689211934804916, -0.11712620407342911, 0.5206218361854553, -0.3314252495765686, 0.14123813807964325, 0.34131497144699097, 0.688636302947998, -0.6626052856445312, -0.08036363869905472, -0.17702269554138184, -0.22149810194969177, 0.33972328901290894, -0.5640208721160889, 0.3718177974224...
COUNT; i++) { pthread_create(&pids[i], &attr, foo, NULL); } for(i = 0; i < COUNT; i++) { pthread_join(pids[i], NULL); } printf("%d\n", n); printf("%d\n", v); return 0; } ``` Can we get a look at the assembler output of the code (gcc -E, I think). Even thought the uname indicat...
[ 0.018248695880174637, -0.102385975420475, 0.5353783369064331, -0.22013597190380096, 0.059338223189115524, -0.0392485186457634, 0.4286300837993622, -0.46492061018943787, -0.10524182766675949, -0.34993046522140503, -0.4129028916358948, 0.453026682138443, -0.5191529393196106, 0.20109385251998...
you can find your cores interfering with one another. But I would be using the pthread functions anyway since they're portable across more platforms.
[ 0.5826927423477173, 0.3144800364971161, -0.054313503205776215, 0.4056302309036255, -0.16400915384292603, 0.07384750992059708, -0.2702241837978363, -0.18885275721549988, -0.18914881348609924, -0.46045228838920593, 0.2573038637638092, 0.3240775763988495, 0.10166215896606445, 0.14200840890407...
Is it possible to host a static HTML website on App Engine? And how to make my domain name work with it? I wrote a library to do just that, and it works on AppEngine or any other server you want: <https://github.com/stochastic-technologies/static-appengine-hoster> You just throw your files in the directory, and it ho...
[ 0.2630516290664673, 0.23058299720287323, 0.3701857626438141, 0.21142134070396423, -0.1242210865020752, -0.056293658912181854, 0.1717747151851654, 0.15102015435695648, -0.3495485782623291, -0.5308446884155273, -0.01827182248234749, 0.36575689911842346, -0.2950274348258972, 0.261726558208465...
Given an ip address (say 192.168.0.1), how do I check if it's in a network (say 192.168.0.0/24) in Python? Are there general tools in Python for ip address manipulation? Stuff like host lookups, ip adddress to int, network address with netmask to int and so on? Hopefully in the standard Python library for 2.5. [This a...
[ 0.20892611145973206, -0.22368556261062622, 0.1991192102432251, -0.13067369163036346, -0.00045948769547976553, -0.10912824422121048, 0.3866671025753021, -0.3961755633354187, -0.1408614069223404, -0.599433183670044, -0.14524653553962708, 0.43644192814826965, -0.24704605340957642, -0.09739726...
dottedQuadToNum(ip): "convert decimal dotted quad string to long integer" return struct.unpack('L',socket.inet_aton(ip))[0] def networkMask(ip,bits): "Convert a network address to a long integer" return dottedQuadToNum(ip) & makeMask(bits) def addressInNetwork(ip,net): "Is an address in a network"...
[ -0.17897288501262665, -0.3356078863143921, 0.6575936079025269, -0.12333901226520538, -0.01741582527756691, 0.14474543929100037, 0.17400266230106354, -0.1753038614988327, -0.3952478766441345, -0.5817506909370422, -0.1767970323562622, 0.09350243210792542, -0.4258878231048584, 0.0037540448829...
netmask = struct.unpack('L',socket.inet_aton(netaddr))[0] & ((2L<<int(bits)-1) - 1) return ipaddr & netmask == netmask ```
[ -0.15100020170211792, -0.03687749803066254, 0.5741731524467468, -0.2316083014011383, -0.1779659241437912, 0.39755138754844666, 0.3456416726112366, -0.1616763025522232, -0.07227566838264465, -0.6890349984169006, -0.05757248029112816, 0.48533686995506287, -0.28666508197784424, -0.28415712714...
I am using auto update in my flex application using the updater framework. I got this article and followed the same steps. <http://blog.multimediacollege.be/2008/12/using-the-air-15-updater-framework-in-flex/#> But i'm getting an error and can't understand the reason: > 1046: Type was not found or was not a > compi...
[ 0.30704575777053833, -0.13688011467456818, 0.5610640645027161, -0.35127750039100647, -0.06914203613996506, 0.08998245000839233, 0.3609437942504883, -0.698456346988678, -0.419519305229187, -0.5614355802536011, -0.5807424187660217, 1.0123865604400635, -0.5371496677398682, -0.3727298974990845...
effort. I added a little to the article as follows: ``` import socket,struct def makeMask(n): "return a mask of n bits as a long integer" return (2L<<n-1) - 1 def dottedQuadToNum(ip): "convert decimal dotted quad string to long integer" return struct.unpack('L',socket.inet_aton(ip))[0] def networkMa...
[ 0.19179169833660126, -0.3077811300754547, 0.5447339415550232, -0.2261551022529602, -0.06352119147777557, 0.02491150051355362, 0.34832295775413513, -0.6018650531768799, -0.17826297879219055, -0.8593881130218506, -0.08980538696050644, 0.6044666767120361, -0.18670547008514404, -0.125111147761...
single function that takes strings it would look like this: ``` import socket,struct def addressInNetwork(ip,net): "Is an address in a network" ipaddr = struct.unpack('L',socket.inet_aton(ip))[0] netaddr,bits = net.split('/') netmask = struct.unpack('L',socket.inet_aton(netaddr))[0] & ((2L<<int(bits)-1) -...
[ -0.3192676901817322, -0.22570064663887024, 0.20239047706127167, -0.09962534159421921, -0.332290917634964, 0.23788033425807953, 0.08350944519042969, -0.24899519979953766, -0.17678473889827728, -0.6958216428756714, -0.14223870635032654, 0.30801406502723694, -0.6020450592041016, -0.1216598823...
Hi can someone point me to some Good Open Source Code to learn Web Programming (Language doesn't matter). i'm looking for source code of web-applications not frameworks I'm not a beginner, I can code to some extent. I want to know how stuffs are done in real world applications. If I understand you correctly, you want...
[ 0.41407352685928345, 0.10078996419906616, 0.40269240736961365, 0.3770642876625061, -0.1898886114358902, -0.16877083480358124, 0.17290663719177246, 0.28982895612716675, -0.09302736073732376, -0.33871373534202576, -0.02423502691090107, 0.3088052570819855, -0.04534613713622093, 0.150949850678...
- coded with PHP, this application is similar to wordpress but slightly more advanced. * [CGI Module](http://search.cpan.org/~lds/CGI.pm-3.43/CGI.pm) - coded with Perl, this perl module is used in most perl based web applications. Understanding the code of this module will give you great insights on a part of how the i...
[ 0.3898152709007263, 0.15699343383312225, 0.5806406736373901, 0.28992709517478943, -0.30873095989227295, 0.047889988869428635, 0.024347903206944466, 0.1554708033800125, -0.4373053312301636, -0.16617080569267273, -0.12195999920368195, 0.1958664208650589, -0.17620553076267242, -0.044877659529...
When i add a listview to my form and in form load event i write below code , items added in the same row not in separated rows , how can i add them to separated rows ``` listView1.MultiSelect = true; listView1.CheckBoxes = true; listView1.Items.Add("Item 1"); listView1.I...
[ 0.3321291506290436, -0.10501230508089066, 0.8664208054542542, -0.22494089603424072, -0.1718265265226364, 0.004588124342262745, 0.42996492981910706, -0.550178587436676, -0.2948528230190277, -0.6912412643432617, -0.22117139399051666, 0.37936967611312866, -0.3737296164035797, 0.11955182999372...
listView1.Items.Add("Item 333"); ``` try this out ``` listView1.View = View.List; ```
[ -0.1911734789609909, -0.16823014616966248, 0.5289720296859741, -0.3812924325466156, -0.12905631959438324, 0.10292374342679977, 0.2142573893070221, -0.29829275608062744, -0.4690302312374115, -0.6435022354125977, -0.2031346559524536, 0.37662985920906067, -0.4355013072490692, 0.02911415882408...
I need a solution for **auto-adjusting** the `width` and `height` of an `iframe` to barely fit its content. The point is that the width and height can be changed after the `iframe` has been loaded. I guess I need an event action to deal with the change in dimensions of the body contained in the iframe. ``` <script type...
[ -0.03981765732169151, 0.06717997789382935, 0.8578466176986694, -0.19244226813316345, 0.3213290572166443, 0.1856854110956192, 0.4494132399559021, -0.3859406113624573, -0.08270144462585449, -0.8434494137763977, -0.30349332094192505, 0.390394926071167, -0.07894795387983322, 0.1442705243825912...
var iframes = document.querySelectorAll("iframe"); for( var i = 0; i < iframes.length; i++) { resizeIFrameToFitContent( iframes[i] ); } } ); </script> <iframe src="usagelogs/default.aspx" id="iFrame1"></iframe> ```
[ -0.19719453155994415, -0.058257658034563065, 0.7346401214599609, -0.3484457731246948, 0.28132930397987366, 0.3763524293899536, 0.32248255610466003, -0.45985159277915955, -0.2612152099609375, -0.6798979043960571, -0.2590830326080322, 0.40539389848709106, -0.13416515290737152, 0.188531652092...
I want to copy some data from an excel file to a textbox in a win app. The copy paste works ok if the cells are continuos, but if I select (with CTRL) the first and the third cell, when I paste it to the textbox, it will paste also the 2nd cell. What is the best way to get just the cells i'm interested in? Thank you Yo...
[ 0.12701991200447083, 0.2244066596031189, 0.3549030125141144, 0.2654757499694824, 0.28315645456314087, 0.03454086557030678, 0.17986522614955902, 0.09525428712368011, 0.1103745698928833, -0.9877745509147644, 0.10739783942699432, 0.5118140578269958, -0.30727800726890564, -0.09969782084226608,...
will have its own way of wrapping accelerators - you need to look them up in the documentation of the framework you're using.
[ 0.5060778260231018, -0.10051070898771286, 0.41941019892692566, 0.39889368414878845, 0.318732351064682, 0.23394440114498138, -0.6040114164352417, -0.16732396185398102, -0.08321714401245117, -0.7192680239677429, 0.31613248586654663, 0.34064483642578125, -0.015727676451206207, -0.236815482378...
I'm validating my CSS at level 2.1 in Visual Studio 08. Is there a way to change the level you validate to? I can't find any. Open up a stylesheet and choose the validation from the drop down menu that appears on the stylesheet menu. I was looking in tools options..
[ 0.5837984681129456, 0.11479097604751587, 0.56293123960495, -0.019398760050535202, -0.13615921139717102, -0.14367136359214783, 0.2045987993478775, -0.014533799141645432, -0.05766814947128296, -0.5777146220207214, 0.2913587689399719, 0.3924311697483063, 0.21044079959392548, -0.08879236131906...
I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros...
[ 0.4264310598373413, 0.19601882994174957, -0.2262110859155655, 0.11540038883686066, -0.19819974899291992, -0.1844920963048935, 0.029011914506554604, 0.35381072759628296, -0.21348530054092407, -0.7758015394210815, -0.05231704190373421, 0.6029834151268005, -0.25152480602264404, 0.220929011702...
the one linking to a library that works for me, that does not mean its the 'best' library. I want to take an existing array and easily convert it to a buffer that can be sent, or take a buffer and easily convert it into an allocated array. Thanks in advance! [json-Glib](http://live.gnome.org/JsonGlib) seems to be in ...
[ 0.167189821600914, 0.023501316085457802, 0.28123584389686584, 0.0424584336578846, -0.10907775908708572, -0.25943320989608765, 0.14845624566078186, 0.11651169508695602, -0.09584051370620728, -0.7607351541519165, -0.050632379949092865, 0.5734038352966309, -0.32014235854148865, -0.16803461313...
Stored procedure that executes fine with a development database but fails to execute in production database? Error returned is :"PLS-00306: wrong number or types of arguments in call to `<procedure naeme>`" VC++ database oracle Closed:The error occurred due to wrong synonym. [json-Glib](http://live.gnome.org/JsonGlib...
[ -0.0932830348610878, 0.08936681598424911, 0.007140386383980513, -0.10053206980228424, 0.21586643159389496, -0.10284831374883652, 0.3235829472541809, 0.12037966400384903, -0.21086545288562775, -0.27709347009658813, -0.15945561230182648, 0.7525938153266907, -0.2885405421257019, 0.11274947971...
I have the problem that I'm instanciating an object on the UI-thread (WinForms). This object creation probably takes very long, and I would like to have some sort of a "timeout" for that method (because it's blocking my app). The problems I have are: 1. the object must be created on the UI thread 2. the object is a f...
[ 0.26349538564682007, 0.09997808188199997, 0.0032495835330337286, 0.2634919583797455, 0.1295650750398636, -0.11271332204341888, 0.29873448610305786, 0.046334147453308105, -0.5694705247879028, -0.5830253958702087, 0.014257486909627914, 0.37812119722366333, 0.13648957014083862, 0.402792483568...
is a bad solution. Use a worker thread on a timer to monitor the UI thread. If the timer elapses before the object is created, have the worker thread call `Abort` on the UI thread. This will raise a `ThreadAbortException` in the UI thread which you must catch. The reasons why this is bad is because you can cause your p...
[ 0.062733493745327, -0.03404688462615013, 0.2579704821109772, 0.0004935924662277102, 0.1536593735218048, -0.15965016186237335, 0.5855244398117065, 0.12681753933429718, -0.20935815572738647, -0.6628604531288147, -0.1541569083929062, 0.31491804122924805, -0.7131990194320679, 0.548133492469787...
it is in the `WaitSleepJoin` state - if the thread never sleeps it will not interrupt, but at least it won't hang or corrupt memory either.
[ 0.4350685477256775, -0.0789068341255188, 0.7301778197288513, -0.003962069749832153, 0.5309835076332092, -0.2281314879655838, 0.22999349236488342, 0.46093785762786865, -0.472698450088501, -0.35090509057044983, 0.016906531527638435, 0.07498735189437866, 0.006327814422547817, 0.43330410122871...
I want to know that how many checkboxes are present on the home page of [www.gmail.com](http://www.gmail.com) and also I want to check the checkbox is checked or not ..... My code is.... ``` Set obj= Description.Create() obj("name").value="PersistentCookie" obj("html tag").value="INPUT" obj("type").value="checkbox" ...
[ 0.12109636515378952, 0.30551889538764954, 0.8556327223777771, 0.07567665725946426, 0.4098239541053772, 0.021304698660969734, 0.4509386122226715, -0.11963829398155212, 0.06000335514545441, -0.7974786758422852, -0.22746916115283966, 0.6306924223899841, -0.22985602915287018, 0.041964124888181...
I have 3 base representations for positive integer numbers: 1. Decimal, in unsigned long variable (e.g. *unsigned long int NumDec = 200*). 2. Hex, in string variable (e.g. *string NumHex = "C8"*) 3. Binary, in string variable (e.g. *string NumBin = "11001000"*) I want to be able to convert between numbers in all 3 re...
[ -0.10923104733228683, 0.1727691888809204, 0.15537144243717194, 0.10201572626829147, -0.22231647372245789, 0.34221822023391724, 0.08849874138832092, -0.418998658657074, -0.17120228707790375, -0.8000306487083435, 0.13219715654850006, 0.4784075617790222, -0.11603294312953949, 0.07112450897693...
efficient approach for each of them? I can use C and C++, but not boost. Edit: By "efficiency" I mean time efficiency: Shortest execution time. As others have pointed out, I would start with [`sscanf()`](http://en.cppreference.com/w/cpp/io/c/fscanf), [`printf()`](http://en.cppreference.com/w/cpp/io/c/fprintf) and/or ...
[ -0.08533210307359695, 0.1310127079486847, 0.31680357456207275, -0.09717513620853424, -0.022811129689216614, 0.15831997990608215, 0.13340063393115997, -0.5565337538719177, -0.13981956243515015, -0.7743212580680847, 0.10041511058807373, 0.7983091473579407, -0.2752070426940918, -0.39866730570...
performance of these conversion is really an issue, then: 1) In some applications / domains certain numbers appear very often, for example zero, 100, 200, 19.95, may be so common that it makes sense to optimize your functions to convert such numbers with a bunch of if() statements, and then fall back to the generic li...
[ 0.277134507894516, -0.020395178347826004, 0.11639077961444855, 0.41036272048950195, 0.10804443061351776, -0.020878225564956665, 0.16097749769687653, -0.3238024413585663, -0.17816008627414703, -0.75972980260849, -0.023533189669251442, 0.323551207780838, -0.03516345098614693, -0.072501219809...
you are not decreasing performance. You may also want to look at boost lexical\_cast functions, though in my experience the latter are relatively compared to the good old C functions. Tough many have said it, it is worth repeating over and over: do not optimize these conversions until you have evidence that they are ...
[ 0.088719442486763, 0.2287311553955078, 0.1891660988330841, -0.044796422123909, 0.06242895871400833, -0.03964932635426521, 0.4852360486984253, -0.07343251258134842, -0.18982534110546112, -0.5808839797973633, 0.06731024384498596, 0.955745279788971, -0.12782256305217743, -0.21920320391654968,...
I need to transfer focus onto another element when user press Enter key, so I succeded to register KeyStroke on most elements this way: ``` this.getInputMap( ).put( KeyStroke.getKeyStroke( '\n' ), "transferFokus" ); this.getActionMap( ).put( "transferFokus", transferFokusa ); ``` everything works fine except fo...
[ 0.027403756976127625, -0.2604832947254181, 0.5220540761947632, -0.13661795854568481, -0.03700464591383934, -0.17951007187366486, 0.20631816983222961, -0.21940484642982483, 0.09348976612091064, -0.8153267502784729, -0.07758811861276627, 0.9599279761314392, -0.20084670186042786, -0.328555971...
editing component for the date string. JXDatePicker.getEditor() returns the text field so maybe you should try calling getInputMap() and getActionMap() on the text field?
[ 0.2060202807188034, -0.44340601563453674, 0.1787622570991516, 0.141695037484169, 0.1081429272890091, -0.1026526615023613, 0.26323312520980835, -0.052606068551540375, -0.2130601704120636, -0.48897239565849304, 0.04217330738902092, 0.5654250979423523, -0.2661352753639221, -0.1681846529245376...
I have a project with multiple modules, each in its own directory. Each module has its own ant build file (build.xml) In the root directory I've set up a general build file that calls the build file of each module in the right order. ``` <?xml version="1.0"?> <project name="bridgedb" default="all" basedir="."> <tar...
[ 0.7467063069343567, 0.1839940994977951, 0.20570218563079834, -0.25824448466300964, -0.03115914948284626, 0.20166490972042084, 0.06963058561086655, -0.4424058794975281, 0.011295126751065254, -1.11505925655365, -0.04849165678024292, 0.23405396938323975, -0.24839305877685547, 0.04716576635837...
<ant dir="makeGdb" target="clean"/> <ant dir="cytoscape-plugin" target="clean"/> </target> ``` And there are more targets like that. Is there a way to rewrite the build file to avoid this duplication? I've looked for a built-in property that contains the active target, but I couldn't find it. Why not use [antca...
[ 0.1319768726825714, 0.10751670598983765, 0.03397512063384056, -0.11242128163576126, -0.2543163299560547, 0.06010757014155388, 0.3304285705089569, -0.5159240365028381, 0.011578399688005447, -0.8978356122970581, -0.11427570134401321, 0.2858833968639374, -0.6218028664588928, -0.16076801717281...
this allows you to parameterise the calls to your subdirs. If you add a new subdir, you only have to add that subdir to the 'doStuffToSubdirs' target (I would rename that as well!)
[ -0.04437456279993057, -0.21427667140960693, 0.5849178433418274, -0.04066909849643707, -0.03887238726019859, 0.12465900927782059, 0.5005443096160889, -0.40098685026168823, -0.01708247698843479, -0.7340989708900452, -0.3834115266799927, 0.7188369035720825, -0.31806308031082153, 0.04504469409...
I'm trying to create a chat application with jQuery without having to using setTimeout in order to minify the number of ajax request: ``` function checkChat(){ new jQuery.ajax({ 'url' : './chat/check.php', 'cache' : false, 'success' : function(messages) { if( m...
[ 0.2167370319366455, 0.05484018847346306, 0.355343759059906, -0.050250593572854996, -0.06191223859786987, -0.22165851294994354, 0.4401838183403015, -0.01093599759042263, 0.026179896667599678, -0.6611754894256592, 0.04560008645057678, 0.4952651858329773, -0.17697879672050476, 0.1011031717061...
$("#empty_chat").append(messages); //write to chat wall } checkChat();
[ 0.07903116196393967, 0.20917503535747528, 0.07682187855243683, -0.39718732237815857, 0.12304914742708206, -0.0016425505746155977, 0.7532375454902649, 0.054811011999845505, 0.12347197532653809, -0.5403950214385986, -0.18769587576389313, 0.6782488822937012, -0.6878947019577026, 0.10452295094...
} }); } ``` On a simple page that's working great but on page that have others ajax events (like navigation) the request are queued and nothing appear as long as messages is empty. The cursor is on a waiting state too. Is there any way to solve this? Not really, unless you want to look into Comet, you're still g...
[ -0.3255103528499603, -0.24752649664878845, 0.421183317899704, 0.06631126999855042, -0.19162093102931976, -0.2898876368999481, 0.26187264919281006, -0.2734905183315277, -0.48490095138549805, -0.6223393082618713, -0.07841906696557999, 0.6076605916023254, -0.7683297991752625, -0.3025425672531...
need to remove the new operator and just do jQuery.ajax or $.ajax [Comet and jQuery](https://stackoverflow.com/questions/136012/comet-and-jquery)
[ 0.026550237089395523, -0.07309240847826004, 0.16746439039707184, 0.25676578283309937, 0.03021746315062046, -0.46554887294769287, 0.17147310078144073, 0.05706050992012024, -0.33298259973526, -0.4082566201686859, -0.17631016671657562, 0.5591199994087219, -0.267581045627594, -0.28126600384712...
I have a WCF services. Which has two methods, say Get and Save. I want to expose only the Get method to the third party who will be consuming the service while my application should be able to consume both Get and Save. Is there a way to consume a method not in OperationContract? I am thinking of verifying the host na...
[ 0.6104103326797485, 0.018809715285897255, 0.6630319952964783, -0.016927922144532204, 0.07428109645843506, -0.21749669313430786, 0.19583185017108917, -0.24612057209014893, -0.2441650927066803, -0.7669476270675659, 0.1169721707701683, 0.6911025047302246, -0.26497671008110046, 0.2070182859897...