text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
practice and expect it to be rare.
To just display a decomposed character, the rendering software needs to deal with combining diacritic marks. It does not suffice to find them in the font. The renderer needs to position the diacritic properly, using information about the dimensions of the base character. There are of... | [
0.21884839236736298,
0.16859064996242523,
0.039690759032964706,
0.27530771493911743,
0.06549178063869476,
0.15028579533100128,
0.4912497103214264,
-0.02323245257139206,
-0.054366372525691986,
-0.933741569519043,
-0.34754955768585205,
0.5326007008552551,
-0.12292379140853882,
-0.05986427888... | |
and effectively map the decomposed character to a precomposed character. But that would require extra code.) | [
-0.426323801279068,
0.031756989657878876,
-0.05988636612892151,
0.12382625788450241,
0.5365331768989563,
0.3734418749809265,
-0.08050346374511719,
-0.23625826835632324,
0.06412751972675323,
-0.5158419013023376,
-0.6779041290283203,
0.2635805010795593,
-0.20893320441246033,
-0.3883809745311... | |
I need to create a simple mySQL database with a field for an image.
Is there a simple example that explains the type of field and how to upload from a directory on the server, etc...?
Thanks.
Erik
Here is a basic example of BLOB Storage:
```
CREATE TABLE IF NOT EXISTS `files` (
`id` int(11) NOT NULL AUTO_INCREMEN... | [
-0.0359642431139946,
0.1221829429268837,
0.45563384890556335,
0.05412670969963074,
0.08005498349666595,
0.13232654333114624,
0.267570436000824,
-0.2251112312078476,
-0.05834094062447548,
-0.6273829936981201,
-0.0029718459118157625,
0.5312273502349854,
-0.2808133661746979,
0.278769433498382... | |
$file_parts = pathinfo($_FILES['upload']['name']);
$file['name'] =$file_parts['filename'];
$file['ext'] =$file_parts['extension'];
$file['data'] =addslashes(file_get_contents($_FILES['upload']['tmp_name']));
mysql_query('INSERT into files (id,filename,ext,filedata) values ("","'.$fil... | [
-0.26159942150115967,
-0.07135360687971115,
0.8512049317359924,
-0.11276920884847641,
-0.06471216678619385,
0.2929929196834564,
0.16482581198215485,
-0.5960920453071594,
-0.3674161434173584,
-0.5318328142166138,
-0.5692049264907837,
0.26293355226516724,
-0.26326891779899597,
0.191469982266... | |
I want to check the file size of the file selected by user, at the client side by using javascript.The code i am using for this is:
```
<script type="text/javascript">
var myFile = document.getElementById('myfile');
//binds to onchange event of the input field
myFile.addEventListener('change', function() {
//t... | [
0.4564738869667053,
0.18897466361522675,
0.5651390552520752,
-0.23316088318824768,
0.053085263818502426,
-0.10881002992391586,
0.38994261622428894,
-0.3743497431278229,
-0.17585445940494537,
-0.9172075986862183,
-0.10069607943296432,
0.5085779428482056,
-0.29125797748565674,
-0.02370473183... | |
In that jsfiddle, it's in the "load" handler. | [
-0.10515332221984863,
-0.07525838911533356,
0.20437414944171906,
-0.12291668355464935,
0.13153880834579468,
-0.39513230323791504,
-0.1538534313440323,
0.06953800469636917,
-0.07987124472856522,
-0.33245763182640076,
-0.23615066707134247,
0.24489645659923553,
-0.39404183626174927,
-0.073634... | |
I am trying to POST data into website to make a login into the site using Jsoup , but its not working ?
I am trying the code
```
Document docs = Jsoup.connect("http://some.com/login")
.data("cmd", "login","username", "xxxx","password", "yyyyy")
.referrer("http://some.com/login/").post();
```
he... | [
0.24970638751983643,
0.1971600502729416,
0.4136383533477783,
-0.11937356740236282,
-0.1307896226644516,
-0.011608794331550598,
0.445537269115448,
0.11160112917423248,
-0.19784866273403168,
-0.8960784077644348,
-0.21606330573558807,
0.4208540618419647,
-0.20437951385974884,
0.08674204349517... | |
would be highly appreciated !!
Thanks....
I will give the answer of your question by taking an example.
Suppose you want to login to facebook.
Then apart from username and password there are many other parameters that are also passed through `POST` request. Those all parameters are hidden and are passed similarly lik... | [
0.3238571286201477,
0.09486717730760574,
0.4125896692276001,
0.19563569128513336,
0.0743260309100151,
-0.12623125314712524,
-0.05208182334899902,
0.12384974956512451,
-0.23262156546115875,
-0.7103930711746216,
0.07371347397565842,
0.4680211544036865,
0.05812795087695122,
0.0964238196611404... | |
doc = Jsoup.connect("http://www.facebook.com")
.data("email", "myemailid")
.data("pass", "mypassword")
// and other hidden fields which are being passed in post request.
.userAgent("Mozilla")
.post();
System.out.println(doc); // will print html source of homepage of facebook.
``` | [
0.2692092955112457,
0.17013803124427795,
0.4705459177494049,
-0.37972572445869446,
0.17282241582870483,
-0.06451860815286636,
0.30508729815483093,
0.15513919293880463,
-0.3466314673423767,
-0.846228837966919,
-0.4023805260658264,
0.36631518602371216,
-0.5366585850715637,
0.1523853391408920... | |
In our rails 3.1.0 app, we would like to access multiple databases based on user credential. There are multiple solutions. One is to install one app for each user and every app only accesses one database. The problem is that if there are many databases (such as hundreds), there would be equal number of app installation... | [
0.2834649384021759,
0.1788099855184555,
0.06483551114797592,
0.3336813449859619,
0.15526458621025085,
0.1921946257352829,
0.2703602910041809,
-0.19520938396453857,
-0.21827560663223267,
-0.7371823191642761,
0.12558408081531525,
0.45250290632247925,
-0.627098798751831,
-0.3969764709472656,
... | |
access for the user who just logs in. Can someone provide solutions and insights about pros and cons of the approache? thanks so much.
You should be able to use [`ActiveRecord::Base.establish_connection`](http://apidock.com/rails/ActiveRecord/ConnectionHandling/establish_connection) to dynamically connect to any databa... | [
-0.1542501449584961,
-0.11865729093551636,
0.18650758266448975,
0.2954266369342804,
0.20706625282764435,
-0.3779018223285675,
0.12040341645479202,
0.24678915739059448,
-0.5387491583824158,
-0.719196081161499,
-0.16678355634212494,
0.4375710189342499,
-0.2951379120349884,
0.3263721168041229... | |
:password => self.password,
:database => self.database
)
Book.all
rescue Exception => e
# ...
end
end
```
You would want to do actual error handling and probably establish the connection somewhere outside of an instance method, but that's up to you to decide. | [
-0.12504181265830994,
0.3043091893196106,
0.39829376339912415,
0.16712427139282227,
0.25288164615631104,
-0.2999531924724579,
0.6407644152641296,
-0.09199240803718567,
0.12420597672462463,
-0.6047462224960327,
-0.3298795223236084,
0.6876705288887024,
-0.27953946590423584,
0.278069078922271... | |
I am creating a UIImageView and adding it in a loop to my view, I set the initial frame to 0,0,1,47 and each passage of the loop I change the center of the image view to space them out.
I am always using 0 as the origin.y
The problem is the origin reference is in the centre of the image view, assuming we was in inter... | [
0.405234158039093,
-0.044852130115032196,
0.7841136455535889,
0.11403656750917435,
-0.24790146946907043,
0.1768314689397812,
-0.08977877348661423,
-0.02541092224419117,
-0.07960030436515808,
-0.8755882382392883,
0.15082228183746338,
0.18573912978172302,
-0.21142534911632538,
0.467286705970... | |
can set position by 2 ways:
* `center` – It definitely says it is the center.
* `frame.origin` – Top left corner, can't be set directly.
If you want the bottom left corner to be at x=300, y=300 you can just do this:
```
UIView *view = ...
CGRect frame = view.frame;
frame.origin.x = 300 - frame.size.width;
frame.orig... | [
-0.06124000996351242,
-0.22431467473506927,
0.8223155736923218,
0.2016848921775818,
-0.010001256130635738,
0.02463460899889469,
-0.115347720682621,
-0.07011836022138596,
0.035350024700164795,
-0.5437406897544861,
0.19306442141532898,
0.34662044048309326,
0.45752984285354614,
0.088364653289... | |
0..1 (including) that specifies point *inside* the view. Default is x=0.5, y=0.5 which means 'center' (and `-[UIView center]` assumes this value). You may set it to any other value and the `position` property will be applied to that point.
Example time:
1. You have a view with size 100x100
2. `view.layer.anchorPoint ... | [
-0.006605385337024927,
-0.24715076386928558,
1.172167181968689,
-0.1429826021194458,
0.0670076310634613,
-0.15007932484149933,
-0.2646785378456116,
-0.20867174863815308,
-0.10736464709043503,
-0.7351842522621155,
-0.16761398315429688,
0.3439039885997772,
0.14509497582912445,
0.121772274374... | |
thing and not **WHAT** you want to achieve, I can't help you any further now. | [
0.6434122920036316,
-0.19280920922756195,
0.038456883281469345,
0.2758607268333435,
0.11175316572189331,
0.1428389549255371,
0.18701310455799103,
-0.18307171761989594,
-0.18307030200958252,
-0.3165600001811981,
0.1359836757183075,
0.5468540787696838,
-0.2271992266178131,
0.3281708359718323... | |
I'm using an imagePickerController to record video. In the `imagePickerController:didFinishPickingMediaWithInfo:` function I'm trying to set the video to a previously defined MPMoviePlayerController:
```
if ([mediaType isEqualToString:(NSString *)kUTTypeMovie]){
NSURL *movieUrl = [info objectForKey:UIImagePickerCo... | [
0.37666526436805725,
-0.18394021689891815,
0.9476964473724365,
-0.03780236095190048,
0.12873023748397827,
-0.15426765382289886,
0.2486410140991211,
-0.36191248893737793,
-0.3488207757472992,
-0.7556039690971375,
-0.04744391888380051,
1.038790225982666,
-0.16195520758628845,
0.2510023117065... | |
(copying the temp video file to my document folder)
```
NSString *directory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *newPath = [directory stringByAppendingPathComponent:@"myMovie.mov"];
NSFileManager *fileManager = [NSFileManager defaultManager];
NS... | [
0.371336430311203,
-0.044620707631111145,
0.7078201174736023,
0.1164134219288826,
0.021079814061522484,
-0.01790562830865383,
0.41871270537376404,
-0.2975395619869232,
-0.2870892882347107,
-0.5791612863540649,
-0.013279981911182404,
0.8952890634536743,
-0.23169445991516113,
0.1685047596693... | |
**Memory Issues**
So I am writing an app that should be able to page through detail views that have one large 640 x 480 image on top and 3 images that are part of a gallery that is being lazy loaded. Following Google design guidelines this is what they suggest doing. I can page through maybe 12 - 13 fragments before i... | [
0.2330126166343689,
0.2459309697151184,
0.011060978285968304,
0.27422675490379333,
-0.17768248915672302,
-0.009697520174086094,
0.5605912804603577,
0.2036239355802536,
-0.30944979190826416,
-0.8611515760421753,
0.09387080371379852,
0.6815204620361328,
-0.13442912697792053,
0.20087452232837... | |
issue? This is not happening. I thought it was automatic. What do I have to do to make this happen? Could it have something to do with how I have my Fragment implemented? I do all of my Activity config in onCreateView. For the sake of thoroughness I've included the source for this. Plain Vanilla here:
```
public stati... | [
0.11933048069477081,
0.061134904623031616,
0.25202295184135437,
0.11268390715122223,
0.11325196176767349,
-0.3104465901851654,
0.42500150203704834,
-0.25249674916267395,
-0.13398823142051697,
-0.5882059931755066,
-0.3752923905849457,
0.6086578369140625,
-0.2588666081428528,
0.4063059389591... | |
}
@Override
public int getCount() {
return NUM_ITEMS;
}
@Override
public Fragment getItem(int position) {
return InventoryDetailFragment.newInstance(position);
}
}
```
2.) I have a method that is trying to | [
-0.025859545916318893,
-0.2789440453052521,
-0.02275945618748665,
0.01690388098359108,
0.12116441875696182,
-0.08088050782680511,
0.29848596453666687,
-0.3239468038082123,
-0.22022350132465363,
-0.5548383593559265,
-0.1694989651441574,
0.4239460229873657,
-0.08067552000284195,
0.3644205927... | |
figure out the size of the image that needs to be downloaded without placing it in memory. Then compresses the image while downloading it to the required size. This is not successfully implemented. But I'm not sure what is going wrong.
```
private Bitmap downloadBitmap(String url, int width, int height) {
Bitmap b... | [
-0.10826481878757477,
-0.5591339468955994,
0.7286391854286194,
0.045584872364997864,
0.2797545790672302,
0.1183118224143982,
0.4411812424659729,
-0.11767588555812836,
-0.4048726558685303,
-0.5977325439453125,
-0.2546848952770233,
0.7732348442077637,
-0.2227936089038849,
-0.0327342450618743... | |
= BitmapFactory.decodeStream((InputStream)new URL (url).getContent(), null, options);
if (options.outHeight > height || options.outWidth > width) {
scale = (int) Math.max(((options.outHeight)/ height), ((options.outWidth)/ width)); }
BitmapFactory.Options o2 = new BitmapFactory... | [
-0.3027817904949188,
-0.3335413634777069,
0.7419808506965637,
-0.24773214757442474,
0.2708936035633087,
0.6487379670143127,
0.4343203902244568,
-0.51630038022995,
-0.4729814827442169,
-0.7579193115234375,
-0.5409174561500549,
0.4088265299797058,
0.0835367888212204,
0.05336925759911537,
0... | |
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} catch (Error e){
Log.d("TEST", "Garbage Collector called!");
System.gc();
}
return bitmap;
}
```
I have tried everything that I know how to do but it's beyond my me... | [
0.5298904776573181,
-0.08167410641908646,
0.11309675127267838,
-0.06558802723884583,
0.20364081859588623,
0.13226406276226044,
0.6579327583312988,
-0.14153696596622467,
-0.06313447654247284,
-0.6975652575492859,
0.13913893699645996,
0.6160492897033691,
-0.6213701963424683,
0.22582869231700... | |
idea: `BitmapFactory.decodeStream((InputStream)new URL (url).getContent(), null, options);` You're getting the image from the web each time this is executed (so *twice* in the code you posted). Instead, you need to download the image and cache it locally.
2. Add logic to your fragments to call `recycle()` on the bitmap... | [
0.21902669966220856,
-0.3024280071258545,
0.286443293094635,
0.336906760931015,
0.09495416283607483,
0.14473816752433777,
0.18405462801456451,
-0.3532731831073761,
-0.3593224585056305,
-0.6891044974327087,
-0.24592670798301697,
0.38391706347465515,
-0.2041519731283188,
0.26208364963531494,... | |
this is what I use, which will always downsample using at least 2 (only call this if you know that the image is too big):
-
```
int ratio = (int) Math.max((height/options.outHeight), ( width/options.outWidth); //notice that they're flipped
for (int powerOfTwo = 64; powerOfTwo >=2; powerOfTwo = powerOfTwo >> 1... | [
0.2805333137512207,
-0.1201997771859169,
0.7432241439819336,
-0.06718362867832184,
0.0839497298002243,
0.29624465107917786,
-0.22007158398628235,
-0.6003146767616272,
-0.3751184046268463,
-0.743044376373291,
-0.06798931211233139,
0.8895666599273682,
0.015504916198551655,
-0.159470811486244... | |
Let's say there's the following directory structure:
```
projects
|
+--lib1
| |
| +-CMakeFiles.txt
|
+--lib2
| |
| +-CMakeFiles.txt
|
+--test
|
+-CMakeFiles.txt
```
### lib1/CMakeFiles.txt:
```
cmake_minimum_required(VERSION 2.0)
add_library(lib1 STATIC lib1.cpp)... | [
-0.09405695647001266,
0.2260769009590149,
0.5817850232124329,
0.15745460987091064,
-0.032040417194366455,
-0.24498681724071503,
-0.013344591483473778,
-0.22925333678722382,
-0.1771622598171234,
-0.5954025983810425,
-0.2576720416545868,
0.3282161056995392,
-0.43263378739356995,
0.0050782738... | |
that's just an example.)
The problem is that with the current setup, lib1 compiles twice - the first time it is within the "test" build directory, and a second time it is within "test/build\_directory/lib2/build\_directory". I'd like to avoid that.
I want to be able to add a dependency on lib1, lib2 or both of them (... | [
0.339568555355072,
0.2642901539802551,
0.39883771538734436,
-0.12145902961492538,
-0.125928595662117,
-0.24511368572711945,
0.3279368579387665,
-0.25773143768310547,
-0.26849180459976196,
-0.8642247915267944,
-0.13376033306121826,
0.3160216510295868,
-0.37294572591781616,
0.041674628853797... | |
top-level directory and be able to include libraries in other projects that can be located elsewhere. Because it is Windows, I can't "install package system-wide" - I don't want to lose ability to switch compiler on the fly. Utility libraries built with different compilers will use different C runtime libraries/ABI, an... | [
0.1752064973115921,
-0.004486812278628349,
0.3574875295162201,
0.027420097962021828,
0.09498623013496399,
-0.34866583347320557,
0.10179733484983444,
-0.21325285732746124,
-0.08365266770124435,
-0.7407733798027039,
-0.19756025075912476,
0.5089336037635803,
-0.51954185962677,
0.0395460352301... | |
the most current version possible
project(test)
add_subdirectory(../lib2 ${CMAKE_CURRENT_BINARY_DIR}/lib2)
add_executable(test main.cpp)
target_link_libraries(test lib2)
```
Also, you should probably remove the `cmake_minimum_required` calls from your non-project CMakeFiles.txt files (the lib ones). For further inf... | [
0.1558777093887329,
0.1363023966550827,
0.4953937232494354,
-0.0321376696228981,
0.19716550409793854,
-0.4972374737262726,
0.23093761503696442,
-0.012637863866984844,
-0.22070518136024475,
-0.7941709160804749,
-0.35140901803970337,
0.39076751470565796,
-0.46714964509010315,
0.1053694784641... | |
project which calls `include`.
`install` could install the libraries to another common subdirectory of `projects/`. Depending on your source directory structure, this could have the benefit of only making the intended library API headers available to dependent projects.
However, both of these options require the depe... | [
0.8134362697601318,
0.0708741694688797,
-0.14188338816165924,
-0.06554087996482849,
0.16619378328323364,
-0.34099167585372925,
0.47262507677078247,
-0.5170794725418091,
-0.1532786339521408,
-0.593953013420105,
-0.4257211983203888,
0.5523061752319336,
-0.4803190231323242,
0.1472819000482559... | |
I develop the site with Day CQ5. I am developing templates, components, and pages and faced with a problem. On the page of the site can be one instance of component, and need to prevent the addition of other instances. How can I do this? Maybe someone has faced this problem?
If the authors don't need the ability to add... | [
0.5388525724411011,
0.15050053596496582,
0.4027165472507477,
0.027769772335886955,
-0.17436546087265015,
-0.10785800218582153,
0.08794432133436203,
-0.134821355342865,
-0.019173474982380867,
-0.716213047504425,
0.13573580980300903,
0.18323099613189697,
-0.3962564766407013,
0.33796364068984... | |
sidekick so they couldn't add additional copies. | [
0.03809231519699097,
-0.16599710285663605,
-0.10441892594099045,
0.49444255232810974,
-0.04555467143654823,
-0.11504531651735306,
0.045352835208177567,
0.0455889031291008,
-0.22337903082370758,
0.06285786628723145,
0.14038333296775818,
0.5886051654815674,
-0.16022108495235443,
-0.473523288... | |
I am new to game development and I am trying to create a simply GUI framework for my current project. I am currently using the Director Class 1.4 for my scene management. I have got my project o change scenes, but now I want to create a pop up window. I just want the pop up window to show up over the current scene I'm ... | [
0.12284066528081894,
-0.09113363921642303,
0.5054090023040771,
-0.22478912770748138,
0.14736981689929962,
-0.09765877574682236,
-0.13479962944984436,
0.4842303395271301,
-0.23152993619441986,
-0.8037660717964172,
-0.11649636179208755,
0.5542469024658203,
-0.1349300742149353,
0.200246423482... | |
very new to Corona and programming in general.
main.lua
```
_W = display.contentWidth
_H = display.contentHeight
local director = require ("director");
local mainGroup = display.newGroup();
local function main()
mainGroup:insert(director.directorView);
director:changeScene("menu");
return true;
end
main();
``... | [
-0.12283732742071152,
-0.35182705521583557,
1.1616945266723633,
-0.12350557744503021,
-0.037052880972623825,
0.02403157576918602,
0.03253164887428284,
-0.36936652660369873,
-0.2069399356842041,
-0.19654513895511627,
-0.13805177807807922,
0.5990278720855713,
0.018276648595929146,
0.04627971... | |
local craft_btn = display.newImage("Images/smithing.PNG", 25, 25);
craft_btn:setReferencePoint(display.BottomLeftReferencePoint);
craft_btn.x = 7; craft_btn.y = 475;
craft_btn.scene = "craftMain";
local inventory_btn = display.newImage("Images/inventory1.png");
inventory_btn:setReferencePoint(disp... | [
-0.11115095019340515,
-0.3931964635848999,
0.9794996380805969,
-0.15736456215381622,
0.25832268595695496,
0.33301278948783875,
0.19089749455451965,
-0.01007096841931343,
-0.5179277062416077,
-0.4936496317386627,
-0.597577691078186,
0.459886372089386,
0.13509754836559296,
0.5191916227340698... | |
localGroup:insert(bg);
localGroup:insert(hero_btn);
localGroup:insert(craft_btn);
hero_btn:addEventListener("touch", changeScene);
craft_btn:addEventListener("touch", changeScene);
return localGroup;
end
```
If the authors don't need the ability to add the component to different areas (parsys con... | [
-0.030805207788944244,
-0.19278845191001892,
0.5987118482589722,
0.06410480290651321,
-0.21558620035648346,
0.16717082262039185,
0.29562368988990784,
-0.1925286203622818,
-0.5566163063049316,
-0.3223482370376587,
-0.3379613757133484,
0.41798532009124756,
-0.3499225676059723,
-0.35866275429... | |
Sample input string:
```
char *str = "12345.567675";
```
And the desired output if I need the precision of 3 places after decimal point:
```
str = "12345.568";
```
Is there a way to do this without converting the string to `double` and back to string?
yeah, on high level:
1. search '.' in the string.
2. if ... | [
0.20167328417301178,
0.09508407860994339,
0.2103312760591507,
-0.2245587259531021,
-0.0003430155338719487,
0.2815243601799011,
0.38700246810913086,
-0.3910256624221802,
0.05844729021191597,
-0.25634482502937317,
0.15453152358531952,
0.3567243218421936,
-0.19258856773376465,
-0.035786129534... | |
goto 4.1 (otherwise goto 5)
4.1. copy the string to a new string that have one more space on the left (cause 9.9999 will be changed to 10.0000 in the '4' loop) and set a pointer (P) to the last char in that string.
4.2. if \*P between 0 to 8 add 1 to it and go to 5.
4.3. if \*P is 9, set it to zero, move the p... | [
0.04586249217391014,
-0.05225556343793869,
0.48858359456062317,
-0.21347421407699585,
-0.09925658255815506,
0.4459797441959381,
0.16232997179031372,
-0.31849202513694763,
-0.17965829372406006,
-0.28553348779678345,
-0.3432646095752716,
0.2093866914510727,
-0.38137948513031006,
0.1087641268... | |
0 on the right of the decimal point (and the decimal point it self if needed) and you done!!!
6. delete everything, and use the double conversion method... | [
0.1412561684846878,
0.1739284247159958,
0.2705027759075165,
-0.21745385229587555,
0.00629466725513339,
-0.06692171096801758,
0.40654751658439636,
-0.08589521050453186,
0.09839153289794922,
-0.21747472882270813,
-0.32178184390068054,
0.6383258104324341,
0.041079822927713394,
0.2874727547168... | |
I want to use javascript to change all of the `<option>` tags to `<a>` tags. I want all of the attributes to stay the same. I simply want to do a switch on what type of tag it is.
I tried doing several variations on this idea but to no avail.
```
$.each (array_of_options, function (i, v) {
v.replace(/option/i, "a... | [
0.2625475227832794,
-0.30181533098220825,
0.23750074207782745,
-0.34418436884880066,
0.2499949187040329,
0.06612318754196167,
0.17763780057430267,
-0.38803473114967346,
-0.21109460294246674,
-0.5181923508644104,
-0.015933586284518242,
0.8543893694877625,
-0.5784273743629456,
-0.13640673458... | |
.text(that.text())
.attr('href','#' + that.val() + '.html')
.appendTo($('body'));
that.remove();
});
```
[JS Fiddle demo](http://jsfiddle.net/davidThomas/SFuW3/3/).
Or, you could use plain JavaScript:
```
var sel = document.getElementById('select'),
opts = sel.getElementsByTa... | [
-0.027863284572958946,
-0.11143528670072556,
0.6640768051147461,
-0.4335918724536896,
0.037872813642024994,
0.4340682327747345,
0.36465251445770264,
-0.46449369192123413,
-0.045948706567287445,
-0.49550729990005493,
-0.4165923297405243,
0.7667224407196045,
-0.19760853052139282,
0.104820147... | |
I have an ASP.NET MVC 3 Solution(C#) Containing multiple projects.
There is a services project containing services that I am using from my main UI Project.
When debugging I can only debug the main starting project. Is there a way to place breakpoints in my other project and debug them at runtime when my main project is... | [
0.4337414801120758,
0.17339785397052765,
0.10757031291723251,
0.004422593861818314,
-0.14849555492401123,
-0.09492930769920349,
0.3464447855949402,
-0.10334952920675278,
-0.44687414169311523,
-0.5809530019760132,
-0.1700819432735443,
0.16162024438381195,
-0.0956740751862526,
0.119350470602... | |
is executing `A_wait_for_event` (and similarly for `B`), then I'm pretty sure you **can't** do anything efficient, and have to settle between various evils.
The most obvious improvement is to immediately take action upon getting an event, rather than trying to read from both: i.e. order your loop
* Wait for an A even... | [
0.42115452885627747,
-0.4180443286895752,
0.02457992173731327,
0.095433808863163,
-0.06964968889951706,
-0.25558531284332275,
0.48377734422683716,
0.013305943459272385,
-0.45125335454940796,
-0.7236944437026978,
0.08980243653059006,
0.4679056406021118,
-0.22857636213302612,
-0.151047661900... | |
after getting and handling an A event, you should go back to waiting for another A event)
* Fiddle with the timeout values to strike a balance between spin loops and too much blocking. (maybe even adjust dynamically)
---
EDIT: You might check the APIs for your library; they might already offer a way to deal with the ... | [
0.3438887596130371,
-0.520937442779541,
0.0357348769903183,
0.25912004709243774,
-0.0666043609380722,
-0.26042279601097107,
0.43539389967918396,
-0.061036616563797,
-0.5182381868362427,
-0.5936660766601562,
-0.07926208525896072,
0.4473295509815216,
-0.2850341498851776,
0.046075355261564255... | |
pipe and hand one end to library `A`, then if thread #1 is waiting for an `A` event, thread #2 can write to the pipe to make an event happen, thus forcing #1 out of `wait_for_event`. With the ability to kick threads out of the `wait_for_event` functions at will, all sorts of new options become available. | [
0.29617223143577576,
-0.37681251764297485,
0.08461480587720871,
-0.15359635651111603,
0.09737861156463623,
-0.2298974096775055,
0.2331971526145935,
-0.19767071306705475,
0.050332605838775635,
-0.6643310189247131,
-0.13063836097717285,
0.3581584692001343,
-0.42337802052497864,
0.32584241032... | |
Have upgraded to eclipse.indigo using a new installation. Added m2e. Maven shows up under Windows>Preferences. File>New>Other>Maven gets the following options: Checkout ..., Maven Module, Maven Project. The Maven POM file option is missing. I'm trying to add Maven support to an existing Java project. Have read the manu... | [
0.15989409387111664,
-0.37441521883010864,
0.4066482484340668,
-0.32891586422920227,
-0.22870264947414398,
0.15964718163013458,
0.2205200046300888,
0.125758096575737,
-0.2546519935131073,
-0.9865756034851074,
-0.1901140958070755,
0.5842695832252502,
-0.35343068838119507,
-0.234328433871269... | |
to choose the correct *Packaging* type (in your case I guess it will be POM). | [
0.3967790901660919,
0.3757530748844147,
-0.020557207986712456,
-0.05071360617876053,
0.057958438992500305,
0.018302462995052338,
-0.22121912240982056,
0.2578867971897125,
-0.187979593873024,
-0.5320268869400024,
-0.08720859885215759,
0.4304608702659607,
0.04143192991614342,
-0.129971653223... | |
I have a table that has multiple rows with the following fields:
```
PersonName SongName Status
```
I want to use names selected from a multiple selection listbox, which I can retrieve the values, and then do a where clause so it shows the song names that the selected people can all play, therefore status is comple... | [
-0.20213310420513153,
0.026417048647999763,
0.518070638179779,
-0.0073046633042395115,
0.3787962794303894,
0.14408430457115173,
0.2079993635416031,
-0.2627214193344116,
-0.034087345004081726,
-0.06535636633634567,
-0.14942710101604462,
0.6374313235282898,
0.1364092379808426,
0.353069365024... | |
Complete
Ryan Highland Complete
```
If I select Holly and Ryan from the list box and press the button the query should just show Highland as that is what they both know.
Try this:
```
select songName from t
where personName in ('Ryan', 'Holly')
group by songName
having count(distinct personName) = 2
... | [
-0.10895691812038422,
-0.08732455223798752,
0.6880639791488647,
-0.25592172145843506,
-0.11963214725255966,
-0.24354375898838043,
0.83590167760849,
-0.5327571034431458,
-0.0023489813320338726,
-0.12054717540740967,
-0.5436338782310486,
0.5198773741722107,
0.3359552323818207,
0.137825608253... | |
I’m hoping to port an application to open vms using HP C++7.3, but at the minute just trying out a few examples to establish if it's a potential way forward but a bit stuck. Being completely new to open vms it's being a lot of fun so far.
For starters I've not got very far building boost as a whole, after some googli... | [
0.5976833701133728,
0.22639156877994537,
0.3077652156352997,
0.18086875975131989,
-0.2943926453590393,
-0.1140342727303505,
0.09009247273206711,
0.3283594250679016,
-0.3131546676158905,
-0.4646582305431366,
0.1250992864370346,
0.8102614879608154,
0.16844667494297028,
-0.018722722306847572,... | |
just trying to compile the asio chat examples. And as I said I’m completely new to VMS and the compiler, I managed to get a few things to compile but now get a “could not open source file "sys/select.h"’, a bit of googling suggests I may need to have an HP porting library installed or maybe I’m just missing an prepoces... | [
0.4194857180118561,
0.2255811095237732,
0.12738525867462158,
-0.05790134146809578,
-0.16200660169124603,
0.17458350956439972,
0.42026498913764954,
0.1383969485759735,
-0.17205774784088135,
-0.5009435415267944,
0.2604745030403137,
0.5845403075218201,
-0.2143840342760086,
0.16296295821666718... | |
what was causing the Exception.
OleDbCommand's are supposed to use '?' instead of a named '@param' parameter but I got it working both ways. Turns out the exception was thrown because I didn't wrap MusicCategory in square brackets.
The working syntax for the sql query is:
```
string select_cmd = "SELECT FileName F... | [
-0.1748145967721939,
0.061190079897642136,
0.4247976243495941,
-0.014023290947079659,
-0.08536405116319656,
0.038543205708265305,
0.010945325717329979,
-0.28197619318962097,
-0.3667236268520355,
-0.03745144233107567,
-0.02970282733440399,
0.5829086303710938,
-0.306576669216156,
0.581412553... | |
> **Possible Duplicate:**
>
> [How to serialize an IList<T>?](https://stackoverflow.com/questions/464525/how-to-serialize-an-ilistt)
I wish to serialize an class (let's call it `S`) that contains a property of the type `IList<T>` where `T` is another class which I have defined. I get an exception when I attempted t... | [
0.20845870673656464,
-0.07756312936544418,
0.06752855330705643,
-0.0048140790313482285,
-0.14241589605808258,
-0.002926068613305688,
0.1773846447467804,
-0.09999372810125351,
-0.16287975013256073,
-0.9098346829414368,
-0.01385743822902441,
0.3724207282066345,
-0.6899612545967102,
0.2913391... | |
to illustrate my example:
```
using System;
using System.Xml.Serialization;
using System.IO;
[Serializable]
public class T { }
[Serializable]
public class S
{
public IList<T> ListOfTs { get; set; }
public S()
{
ListOfTs = new List<T>();
}
}
public class Program
{
public void Main()
... | [
0.21489906311035156,
-0.5623751878738403,
0.5401756763458252,
-0.07268297672271729,
0.0211635734885931,
-0.007974899373948574,
0.2403334677219391,
-0.3140961825847626,
-0.5507550239562988,
-0.7931438684463501,
-0.430377721786499,
0.48287391662597656,
-0.46341079473495483,
0.398641973733902... | |
XmlSerializer(typeof(S));
serializer.Serialize(new StringWriter(), s);
}
}
```
I'm hoping there's an attribute I can place above the `ListOfTs` definition that says to the serialize, "assume an instance of `List<T>` when serializing/deserializing".
Change the
```
public IList<T> ListOfTs { get; set; }
`... | [
0.011266207322478294,
-0.2798086106777191,
0.6752610802650452,
-0.0019469995750114322,
0.08091945946216583,
-0.29224950075149536,
-0.010668745264410973,
-0.3459659814834595,
-0.06992343068122864,
-0.9444637894630432,
-0.3374839723110199,
0.7120968699455261,
-0.2690182030200958,
-0.06880586... | |
I've got a project which I documented using epydoc. Now I'm trying to switch to sphinx. I formatted all my docstrings for epydocs, using B{}, L{} etc for bolding, linking and the like, and using @param, @return, @raise etc to explain input, output, exceptions and the likes.
So now that I'm switching to sphinx it lose... | [
-0.13430564105510712,
-0.0631370097398758,
-0.19522355496883392,
0.10682984441518784,
-0.24657148122787476,
0.12813575565814972,
0.2557997405529022,
-0.07565471529960632,
-0.46210217475891113,
-0.5609980821609497,
-0.1509750783443451,
0.5515474081039429,
-0.5732381939888,
-0.09951826930046... | |
demonstration (try it by adding the code to **conf.py**). It replaces the `@` character in some common [Epytext fields](http://epydoc.sourceforge.net/fields.html) with `:`, which is used in the corresponding [Sphinx fields](http://sphinx.pocoo.org/domains.html#info-field-lists).
```
import re
re_field = re.compile('... | [
0.28868743777275085,
-0.19774064421653748,
0.3465515673160553,
0.18545782566070557,
-0.08136455714702606,
0.24073722958564758,
0.2596568763256073,
-0.7103875875473022,
-0.38110947608947754,
-0.3771423399448395,
-0.19333994388580322,
0.420307993888855,
-0.220792755484581,
-0.080770008265972... | |
I am wondering How i can remove a part if my string .
For example my string will be :
```
string test = "/blabla/test/ok";
```
How can I say that I want to remove /blabla/ ?
And my string will be /test/ok.
How about stripping the first 8 characters?
```
test = test.Substring(7);
``` | [
0.005865165963768959,
0.14757350087165833,
0.09768331795930862,
-0.3965948820114136,
-0.007988626137375832,
0.44455423951148987,
0.4399614930152893,
-0.01647128537297249,
0.04078911989927292,
-0.2107558697462082,
-0.4625925123691559,
0.31707826256752014,
-0.1342240273952484,
0.097132451832... | |
I have a tcp server which uses certificates for ssl/tls and licensing. For the ssl/tls the certificate(s) are stored in a pkcs#12 file, which I assume would be installed as part of the installation process.
Regarding the Rhino Licencing, is it normal practice to install the x.509 certificate in the certificate store ... | [
0.5389283299446106,
0.1280456930398941,
0.342710942029953,
0.13950176537036896,
-0.09724510461091995,
-0.44417884945869446,
-0.036254435777664185,
-0.08935220539569855,
-0.46717020869255066,
-0.47304317355155945,
0.022744659334421158,
0.5537949800491333,
-0.10728124529123306,
0.09670391678... | |
focus too much on the Rhino licensing aspect.
Thanks.
I found the answer to my own question and here goes:
The problem was that WCF was unable to serialize the circular reference that Entity Framework created when loading the referenced entities.
To resolve this issue, simply put
```
[DataContract(IsReference = t... | [
0.48020637035369873,
-0.006774804089218378,
0.34614184498786926,
0.015050744637846947,
-0.07548435777425766,
-0.029135368764400482,
-0.008923613466322422,
-0.41291043162345886,
-0.4767249822616577,
0.04291563481092453,
0.3255370855331421,
0.7181524038314819,
-0.13505235314369202,
0.3053574... | |
First off, I'm sorry for asking such a simple question in such a sophisticated place. I'm writing a one-off app to parse a text file. It's a console app with the typical static Main().
I've declared another class like so. I've omitted the get/set because of the nature of the operation (it will be used once...never aga... | [
0.24433737993240356,
0.04315973445773125,
0.1717756986618042,
0.10698717832565308,
0.00517853070050478,
0.21413502097129822,
0.2364221215248108,
-0.028775053098797798,
-0.08771756291389465,
-0.5022853016853333,
-0.3159923255443573,
0.8323941230773926,
-0.49754419922828674,
0.22023674845695... | |
numbers = n;
rm = r;
time = t;
desc = d;
}
}
```
When I try to instantiate the class in Main() with this statement:
```
Entry newEntry = new Entry(numbers, rn, time, desc);
```
I receive the error that Entry doesn't have a constructor that takes 4 arguments. All of the variables being p... | [
-0.09936494380235672,
0.1268150806427002,
0.3167556822299957,
-0.18388469517230988,
0.10009945183992386,
0.0729220062494278,
0.7114376425743103,
-0.03644312918186188,
-0.2817435562610626,
-0.44346776604652405,
-0.2710876762866974,
0.47112226486206055,
-0.06069764867424965,
0.62988430261611... | |
the constructor private. If you don't use an access modifier for your constructor, it will be set as private by default. Put "public" in front of the constructor and it should work:
```
public class Entry
{
public List<string> numbers;
public string rm;
public string time;
public string desc;
publ... | [
0.09208731353282928,
0.13889870047569275,
0.1901826113462448,
0.022062120959162712,
0.09115442633628845,
0.10308677703142166,
0.33238279819488525,
-0.25164246559143066,
-0.1773536503314972,
-0.36061733961105347,
-0.3753194212913513,
0.7431268095970154,
-0.28182724118232727,
0.4618715047836... | |
time = t;
desc = d;
}
}
``` | [
0.20415885746479034,
0.08088507503271103,
0.0694056823849678,
-0.43088042736053467,
0.31130683422088623,
-0.2032845914363861,
0.32650116086006165,
-0.06659601628780365,
-0.14131371676921844,
-0.5380281209945679,
-0.3657115399837494,
0.8886590003967285,
-0.19929000735282898,
0.4996748864650... | |
I have a db table containing a column `display_order`. The data looks like this:
```
2
4
7
10
12
```
I want to update the same db column and it should look like this:
```
1
2
3
4
5
```
Please suggest some easy SQL code.
Have a look into [ROW\_NUMBER()](http://msdn.microsoft.com/en-us/library/ms186734%28v=sql.... | [
0.14123648405075073,
0.38980579376220703,
0.42993950843811035,
-0.136361226439476,
-0.12453997880220413,
0.06262482702732086,
0.0786719024181366,
-0.21148192882537842,
0.04081669822335243,
-0.9267308115959167,
-0.004131917376071215,
0.668184220790863,
-0.3823225498199463,
0.312259018421173... | |
I want the date to be sn at my page, I used this fn to the date using Javascript:
```
function Return()
{
var d = new Date();
var n = d.();
var to ="";
if (n == 0) | [
0.1488933563232422,
-0.11907651275396347,
0.5346630811691284,
-0.4282868206501007,
0.1433148831129074,
0.08557942509651184,
0.21876494586467743,
-0.16027916967868805,
-0.04032132774591446,
-0.6219277381896973,
-0.28768375515937805,
0.41325947642326355,
-0.1979328840970993,
0.44384393095970... | |
to = 'Sun';
else if (n == 1)
to = 'Mon';
else if (n == 2)
to = 'Tues';
else if (n == 3)
to = 'Wednes'; | [
0.34201520681381226,
-0.0065236883237957954,
0.3883572220802307,
-0.6507223844528198,
0.050926268100738525,
0.28508564829826355,
0.4098667800426483,
-0.2090919315814972,
0.1344001144170761,
-0.5097286105155945,
-0.783921480178833,
0.753534197807312,
-0.00958025548607111,
0.2155903875827789... | |
else if (n == 4)
to = 'Thurs';
else if (n == 5)
to = 'Fri'
else if (n == 6)
to = 'Satur';
else
alert('To | [
0.2623384892940521,
-0.3141917586326599,
0.35503020882606506,
-0.30293408036231995,
0.20613186061382294,
0.050742216408252716,
0.41841280460357666,
-0.2683805823326111,
-0.13598966598510742,
-0.25564754009246826,
-0.9244050979614258,
0.7705571055412292,
-0.548126757144928,
-0.1994082331657... | |
is No');
return to;
}
```
At the page I used this line to call it, but it's not working:
```
<input id="DateAndTime" type="text" value ="Return()"></input>
```
Do you know can I display it on the page?
And if you know any better(but simple too) ideas for sing the date at pages please inform me abo... | [
0.05149282515048981,
-0.04396070912480354,
0.4242740571498871,
-0.32657450437545776,
-0.16406980156898499,
0.032998278737068176,
0.34137579798698425,
-0.02099854312837124,
0.12124229967594147,
-0.5839528441429138,
-0.05054605379700661,
0.4901607036590576,
0.1072843000292778,
-0.06161107122... | |
= new Date();
var n = d.getDay();
var today ="";
if (n == 0)
today = 'Sunday';
else if (n == 1)
today = 'Monday';
else if (n == 2)
today = 'Tuesday';
else if (n == 3) | [
0.142374187707901,
-0.40622037649154663,
0.503092348575592,
-0.3341831862926483,
0.2134060263633728,
0.11337205022573471,
0.3585231602191925,
-0.08870156854391098,
-0.3753208816051483,
-0.41138219833374023,
-0.48901447653770447,
0.542371392250061,
-0.3005523681640625,
0.4645414650440216,
... | |
today = 'Wednesday';
else if (n == 4)
today = 'Thursday';
else if (n == 5)
today = 'Friday'
else if (n == 6)
today = 'Saturday';
else
alert('Today is NoDay');
document.getElementById("DateAndTime").value = today;
}
ReturnDay(); | [
0.22660084068775177,
-0.28605201840400696,
0.6592880487442017,
-0.10375439375638962,
0.5844186544418335,
-0.0047938148491084576,
0.21506789326667786,
0.17952890694141388,
-0.3202880322933197,
-0.4227864742279053,
-0.28301045298576355,
0.554507315158844,
-0.2545478343963623,
0.4553317427635... | |
</script>
```
and your html
```
<input id="DateAndTime" type="text" value ="" />
```
Link to jsfiddle: <http://jsfiddle.net/mr2rr/> | [
0.2697589099407196,
0.12421764433383942,
0.7544592022895813,
-0.27684536576271057,
-0.15459272265434265,
-0.28281962871551514,
0.16319458186626434,
-0.053538065403699875,
-0.4739464819431305,
-0.7029607892036438,
-0.5913125276565552,
0.27391189336776733,
-0.1324523389339447,
-0.21439982950... | |
I am making an application in Java and I want to allow users to encrypt a file (or folder - I'd zip the directory) using a password of their choice. I currently have the following method(s):
```
static Cipher createCipher(int mode, String password) throws Exception {
PBEKeySpec keySpec = new PBEKeySpec(pas... | [
0.04057344049215317,
0.32914844155311584,
0.43344977498054504,
-0.22846536338329315,
0.08693049848079681,
0.012407012283802032,
0.6199424266815186,
-0.3707534670829773,
0.04496816173195839,
-0.7881914377212524,
-0.4223041236400604,
0.46557503938674927,
-0.40315571427345276,
0.4039784967899... | |
MessageDigest md = MessageDigest.getInstance("MD5");
md.update("input".getBytes());
byte[] digest = md.digest();
byte[] salt = new byte[8];
for (int i = 0; i < 8; ++i)
salt[i] = digest[i];
PBEParameterSpec paramSpec = new PBEParameterSpec(salt, | [
-0.2314234972000122,
-0.39650118350982666,
0.5784403085708618,
-0.09765519946813583,
-0.21518917381763458,
0.30578646063804626,
0.36179882287979126,
-0.46225595474243164,
-0.45601552724838257,
-0.7741488814353943,
-0.1681918054819107,
0.3019523322582245,
-0.31361666321754456,
0.21043032407... | |
20);
Cipher cipher = Cipher.getInstance("PBEWithMD5AndDES");
cipher.init(mode, key, paramSpec);
return cipher;
}
static void applyCipher(String inFile, String outFile, Cipher cipher) throws Exception {
String decryption = "";
CipherInputStream in = n... | [
-0.19844259321689606,
-0.4069967567920685,
0.5444654822349548,
-0.12248878180980682,
0.20385271310806274,
-0.11723298579454422,
0.33849844336509705,
-0.6697390079498291,
-0.2018851935863495,
-0.542073130607605,
-0.5176673531532288,
0.43010208010673523,
-0.49589866399765015,
0.2729826271533... | |
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFile));
int BUFFER_SIZE = 8;
byte[] buffer = new byte[BUFFER_SIZE];
int numRead = 0;
do {
numRead = in.read(buffer); | [
-0.23754508793354034,
-0.3625905215740204,
0.265810489654541,
-0.42507654428482056,
0.27887341380119324,
0.28351297974586487,
0.16762715578079224,
-0.39245837926864624,
-0.2235100418329239,
-0.4940403401851654,
-0.05752522498369217,
0.3337373435497284,
-0.20204585790634155,
0.0894113481044... | |
System.out.println(buffer + ", 0, " + numRead);
if (numRead > 0){
out.write(buffer, 0, numRead);
System.out.println(toHexString(buffer, 0, numRead));
}
} while (numRead == 8); | [
-0.5278359055519104,
-0.08582479506731033,
0.3520676791667938,
-0.5148021578788757,
0.34645843505859375,
0.3395175039768219,
0.22186130285263062,
-0.16459035873413086,
-0.2455936223268509,
-0.38179054856300354,
-0.3134694993495941,
0.34346914291381836,
-0.25748685002326965,
0.2727797925472... | |
in.close();
out.flush();
out.close();
}
private static char[] hex_table = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f'};
public static String toHexString(byte[] data, int offset, int length) | [
-0.2935793101787567,
-0.024194777011871338,
0.5716375708580017,
-0.346421480178833,
0.3454357087612152,
0.393098920583725,
-0.07064083218574524,
-0.2116587907075882,
-0.005426920484751463,
-0.27062317728996277,
-0.4488910436630249,
0.4366789162158966,
-0.528881847858429,
0.1403009295463562... | |
{
StringBuffer s = new StringBuffer(length*2);
int end = offset+length;
for (int i = offset; i < end; i++)
{
int high_nibble = (data[i] & 0xf0) >>> 4;
int low_nibble = (data[i] & 0x0f);
s.append(hex_table[high_nibble]);
s.append(hex_table[low_nibble]); | [
-0.19451110064983368,
-0.36818909645080566,
0.894938588142395,
-0.539466917514801,
0.016749432310461998,
0.3741832375526428,
0.20384778082370758,
-0.6489796042442322,
-0.1567612588405609,
-0.3831407129764557,
-0.5064353942871094,
0.42260411381721497,
-0.42147764563560486,
0.085610754787921... | |
}
return s.toString();
}
```
However, to make the program more user friendly I would like to be able to check that the user has entered the correct password before a file is produced. I don't want to "leave the key under the door mat" or completely undo the security etc. - I just want to prevent the wron... | [
0.18794089555740356,
0.13726387917995453,
0.26886171102523804,
-0.18960553407669067,
0.2605692744255066,
-0.39996370673179626,
0.3985491693019867,
0.08489251136779785,
0.1188107281923294,
-0.6978916525840759,
-0.4245380163192749,
0.800100564956665,
-0.23745016753673553,
0.02634624391794204... | |
The later users two different outdated primitives. The former is the current standard.
you have two options
1. Fast but less secure:
Put a short known value at the start of your encrypted file or encrypt an entirely different short file under the same password. When you decrypt this file, check for the known value. ... | [
-0.11988131701946259,
-0.14820709824562073,
0.025000033900141716,
0.336055725812912,
-0.04506094381213188,
-0.44617071747779846,
0.4145117700099945,
-0.02209293283522129,
-0.29855746030807495,
-0.3494100868701935,
-0.015385540202260017,
0.6838327050209045,
-0.11943911761045456,
0.234983876... | |
issue since your key derivation function should be hard enough and they still have to run that
2. Store the hash of the file encrypted as well and verify the hash on decryption.
More secure in that the attacker has to decrypt the whole file and read through it, but by the same token it is slow. | [
-0.34207701683044434,
0.07660186290740967,
0.17747211456298828,
0.17693160474300385,
0.04337398707866669,
-0.514592707157135,
0.5055339336395264,
-0.3526468873023987,
-0.26193559169769287,
-0.5117680430412292,
-0.16664078831672668,
0.5270189642906189,
-0.035934992134571075,
-0.047352362424... | |
Could someone tell me a good pattern to use when coding asynchronous http handlers in F#?
I have to implement `IHttpAsyncHandler` and that interface requires a `BeginProcessRequest` and `EndProcessRequest`.
Do I return `Async.StartTask`? How do I handle `state:obj` and `AsyncCallback`?
Off the top of my head: impleme... | [
0.1323341280221939,
-0.031601760536432266,
0.2487497627735138,
-0.045871008187532425,
-0.03775843232870102,
-0.09325532615184784,
0.3420470356941223,
-0.3739776611328125,
0.050591908395290375,
-0.8768985271453857,
-0.1663881242275238,
0.4764343500137329,
-0.34987354278564453,
-0.0068615921... | |
beginAction, endAction, _ = Async.AsBeginEnd(processRequestAsync)
interface IHttpAsyncHandler with
member this.BeginProcessRequest(context, callback, extraData) = beginAction(context, callback, extraData)
member this.EndProcessRequest(iar) = endAction (iar)
// other members omitted
``` | [
-0.40310490131378174,
0.10222477465867996,
0.34167686104774475,
-0.13560084998607635,
0.16454029083251953,
0.15234777331352234,
0.42736417055130005,
-0.46040818095207214,
-0.1066841185092926,
-0.4268869161605835,
-0.3409672975540161,
0.3146626651287079,
-0.37671467661857605,
0.276974439620... | |
Considering that a book in DocBook format can be done in a "modular" fashion, I hoped I can do similar with AsciiDoc and split chapters and first-level sections in separate files. Unfortunately documentation does not say anything about this. The only possible solution I see so far is to write my own AsciiDoc preprocess... | [
0.09419772028923035,
0.08170928061008453,
0.4504598379135132,
0.06397657841444016,
0.10901251435279846,
-0.07550957798957825,
0.13867346942424774,
-0.28377166390419006,
-0.13777947425842285,
-0.5920780301094055,
-0.23591911792755127,
0.589958906173706,
-0.21945206820964813,
-0.224654659628... | |
I have a VOIP Based app which needs to be run 24/7..But System is Killing my application when my application is background..
1) How do i know when system is killing my application.?
2) Can i set some application parameter so that system wont kill my application.?
3) I am aware of how to re-storing the application wh... | [
0.6395973563194275,
-0.025478102266788483,
0.5456948280334473,
0.12106392532587051,
0.020546341314911842,
0.06352513283491135,
0.5171021223068237,
-0.11054234206676483,
-0.36181706190109253,
-0.5737918019294739,
0.16932038962841034,
0.6833212375640869,
-0.3724648952484131,
0.06163385137915... | |
make my App Running all time and Listens to data from Server.
Your Comments will me much appreciated.
Thanks
How is your app designed ? Is the 24\*7 process running as a Service in the background ? If not, I would suggest making it a Service, as, in that way, Android would only be killing it, in case, the phone memo... | [
0.9080705046653748,
0.043546125292778015,
0.35999351739883423,
0.212474063038826,
0.037471164017915726,
-0.01051842886954546,
0.5060464143753052,
0.229643315076828,
-0.3243340253829956,
-0.7829029560089111,
-0.18701209127902985,
0.8491227030754089,
-0.3321867287158966,
-0.1178664043545723,... | |
the service on broadcast receipt, else kill the service as well. That way, even the service won't be running all the time.
So, it all depends, on what is your requirement.. | [
0.8366630673408508,
-0.10779547691345215,
0.6773671507835388,
0.13205096125602722,
-0.04550480842590332,
0.020788531750440598,
0.2564907670021057,
-0.018240220844745636,
-0.019462157040834427,
-0.36402276158332825,
-0.09039605408906937,
0.7999851107597351,
-0.2962099313735962,
0.0927710235... | |
Which has better execution performance: CSS3 animations, or jQuery animations?
How do they affect the user's browser’s performance or execution speed?
I’m not concerned about browser compatibility, just execution performance.
@tstenner shared a good link and it probably would kill your doubts but if you want make som... | [
0.23636533319950104,
0.0008793724700808525,
-0.2136547714471817,
0.18186773359775543,
-0.5260332822799683,
0.19559448957443237,
0.02479855902493,
0.1722845584154129,
-0.33856645226478577,
-0.6174727082252502,
-0.018465502187609673,
0.44627273082733154,
-0.025718694552779198,
-0.15363359451... | |
I'm having a function which receives string parameters and convert them to integers.
For safe conversion int.TryParse() is used.
```
public IEnumerable<object> ReportView(string param1, string param2)
{
int storeId = int.TryParse(param1, out storeId) ? storeId : 0;
int titleId = int.TryParse(param2, out titleI... | [
0.28520292043685913,
0.07782283425331116,
0.6919164657592773,
0.12010636925697327,
0.16103783249855042,
0.11062323302030563,
0.4888764023780823,
-0.7549290657043457,
-0.13918299973011017,
-0.4925216734409332,
-0.21871697902679443,
0.7010624408721924,
-0.1731310337781906,
0.0408216081559658... | |
and ignore the decimals. But it won't, even Convert.ToInt32("string")
Thanks to all.
```
public IEnumerable<object> ReportView(string param1, string param2)
{
decimal tmp;
int storeId = decimal.TryParse(param1, out tmp) ? (int)tmp : 0;
int titleId = decimal.TryParse(param2, out tmp) ? (int)tmp : 0;
IEnumera... | [
0.3648282289505005,
0.08539003133773804,
0.576665997505188,
0.12222117930650711,
0.10201350599527359,
0.10117032378911972,
0.4173579514026642,
-0.4867229759693146,
-0.016282927244901657,
-0.47097843885421753,
-0.26379600167274475,
0.5820490717887878,
-0.1964239478111267,
0.0262861102819442... | |
I want to create a set of classes that are very similar and can be cast to each other types. My idea was that I would create an Interface object and implement it through a base class. Then create additional classes that inherit from my base. I could then use the Interface to work with the common (base) methods and cast... | [
0.33366480469703674,
0.005965530406683683,
0.4360435903072357,
-0.03410382941365242,
-0.03907080367207527,
0.13011214137077332,
0.118738554418087,
-0.21599030494689941,
0.273341566324234,
-0.7245628833770752,
0.14076001942157745,
0.5298686027526855,
-0.7066323757171631,
0.14228089153766632... | |
a generic base object
return new MyBase();
}
// How I'm trying to use this
MyCustom1 obj = GetGeneralOjbect() as MyCustom1;
```
This seems to work except for the casting of the object statement. MyCustom1 is always null even though the static helper GetGeneralOjbect returns a good MyBase object. Maybe this can'... | [
-0.0664638802409172,
-0.0324329249560833,
0.4043746888637543,
-0.19767622649669647,
-0.17963774502277374,
-0.07380074262619019,
0.34568512439727783,
0.08632513135671616,
0.0897856131196022,
-0.38059696555137634,
0.01785380020737648,
0.43375763297080994,
-0.6210389137268066,
0.2316563725471... | |
`b` to `MyCustom2` will fail.
What you *can* do is:
```
MyBase b = new MyCustom2();
MyCustom2 c = b as MyCustom2();
```
What you *can't* do is:
```
MyBase b = new MyCustom2();
MyCustom1 c = b as MyCustom1();
``` | [
0.2888481020927429,
0.255153626203537,
0.33721306920051575,
-0.46139800548553467,
0.3056366741657257,
-0.10382479429244995,
0.4086281955242157,
-0.3102404475212097,
-0.00890009943395853,
-0.4136599004268646,
-0.574160635471344,
0.6965399384498596,
-0.4533601403236389,
-0.04688265174627304,... | |
I have an ImageView that I want to show only parts of at a time. But starting from the same x,y coordinates. Is there an easy way to do this?
This is because you can cast a `MyCustom1` or `MyCustom2` to `MyBase`, but not necessarily the other way.
When you create a `MyBase` via `MyBase b = new MyBase();`, `b` is a `My... | [
0.35699397325515747,
0.07105571776628494,
0.4260791838169098,
-0.2092277705669403,
-0.008285867050290108,
0.07985929399728775,
0.0653587281703949,
-0.1284387856721878,
-0.023176327347755432,
-0.9319154620170593,
-0.09326116740703583,
0.4021397531032562,
-0.3612911105155945,
0.0543889552354... | |
I'm finding myself coding C3 for the first time, and using Visual Studio for the first time in a looong time.
I'm creating a user control that allows for picking a file/folder etc, for making that kindof control easier to implement in the future. However whenever I drag the control unto any form, Visual Studio crashes... | [
0.14431077241897583,
-0.013161915354430676,
0.10501065850257874,
0.11337199062108994,
-0.11058621853590012,
-0.014560128562152386,
0.23027893900871277,
-0.11067748814821243,
-0.09211725741624832,
-0.6261880397796631,
-0.2641834318637848,
0.55347740650177,
-0.39341795444488525,
-0.010751180... | |
public partial class pathchooser : UserControl
{
#region "Datatypes"
public enum DLG { Folder, FileSave, FileOpen };
#endregion
#region "public properties"
public DLG Dtype
{
get
{ | [
-0.23911722004413605,
-0.5828254818916321,
0.4692600667476654,
0.20118901133537292,
0.09910424053668976,
-0.15302692353725433,
0.27782437205314636,
0.13531498610973358,
0.09181743115186691,
-1.0713040828704834,
-0.43175703287124634,
0.27466633915901184,
-0.2136107087135315,
0.3257765173912... | |
return this.Dtype;
}
set
{
this.Dtype = value;
}
}
public string labelText | [
0.023096030578017235,
-0.28964534401893616,
0.1147182434797287,
-0.09259016811847687,
-0.12226535379886627,
-0.26013603806495667,
0.20827451348304749,
-0.07847564667463303,
0.2099578082561493,
-0.655128002166748,
-0.27681639790534973,
0.507131040096283,
-0.488452285528183,
0.38397052884101... | |
{
get
{
return this.labelText;
}
set
{
this.labelText = value; | [
-0.2392144352197647,
-0.198174849152565,
0.2525360584259033,
-0.14098601043224335,
0.24174821376800537,
-0.1555929034948349,
0.36261579394340515,
-0.23342187702655792,
0.2011757493019104,
-0.5755677223205566,
-0.5698094964027405,
0.6613063216209412,
-0.3870977461338043,
-0.0122949080541729... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.