text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Although the [MTASC command-line compiler](http://www.mtasc.org/#usage) can compile [ActionScript](http://en.wikipedia.org/wiki/ActionScript) class files into an [SWF](http://en.wikipedia.org/wiki/SWF), I need specific insights into its capabilities, via the command-line switches.
* Configure which **[Flash Player](ht... | [
0.2631800174713135,
0.014134620316326618,
0.3117735683917999,
-0.2344232052564621,
-0.1487581580877304,
-0.0798567682504654,
0.0975356325507164,
-0.5727383494377136,
-0.19498129189014435,
-0.4595441222190857,
-0.16230441629886627,
0.731984555721283,
-0.4600108861923218,
-0.2363518327474594... | |
**class A** into frame 1, **class B** into frame 2, **class C** into frame 3 of the flash movie.
As far as I'm aware you can't specify what classes go into what frames. You can however designate a frame where all class code will be exported. Since the SWF format is a steaming format (it's downloaded frame by frame) you... | [
0.40827664732933044,
-0.293692022562027,
0.2343437224626541,
0.15249432623386383,
-0.42829281091690063,
-0.16007058322429657,
0.02124958485364914,
0.04793047532439232,
-0.34311923384666443,
-0.5767709612846375,
-0.20504170656204224,
0.1514686495065689,
-0.3065641522407532,
0.17792962491512... | |
loaded, you can create a SWF preloader on frame one.
You also might what to have a look at [swfmill](http://www.swfmill.org/) that lets you layout the frames of your SWF and import assets. You can use MTASC to inject code into a swfmill generated SWF. | [
0.40375229716300964,
-0.08784464746713638,
0.4516580104827881,
0.03568283095955849,
-0.2496495097875595,
-0.24856507778167725,
0.1645800620317459,
-0.19010713696479797,
-0.3553610146045685,
-0.5275714993476868,
-0.20290431380271912,
0.4947843551635742,
-0.5115991234779358,
-0.0937666296958... | |
I've looked all over the [Haxe](http://haxe.org/) Flash Command-line compiler website but was unable to find any detailed **documentation of the [HXML files](http://haxe.org/doc/start/flash)** *(scroll down to the "Changing SWF properties" section)* which describe the compile.
Anybody know of a reference [source?](htt... | [
0.40800008177757263,
0.23293793201446533,
0.5531188249588013,
-0.09788001328706741,
-0.10128062963485718,
-0.15048173069953918,
0.27137938141822815,
-0.2536037564277649,
-0.14931975305080414,
-0.7272051572799683,
-0.2617606222629547,
0.6277366280555725,
0.006278119049966335,
0.092107839882... | |
I have an ASP.NET webforms application with a Menu control. How does one hide a particular menu item via code? I've seen a few articles pointing out how to do it with ASP.Net membership/roles-based security, but this particular use case has nothing to do with that. I simply need a way to programmatically remove a menu ... | [
0.06526128947734833,
0.051176466047763824,
0.20183752477169037,
-0.1837116926908493,
-0.16468355059623718,
0.28119316697120667,
0.2982187271118164,
0.11158576607704163,
-0.40697240829467773,
-0.7425218820571899,
-0.325406551361084,
0.24526731669902802,
-0.6771449446678162,
0.34543418884277... | |
I'm writing an application that needs a log-like view, (similar to how an IM client displays messages in the conversation), with potentially many updates per second. Speed is an issue here; the application locking up due to a large number of incoming events is a possible problem. I need selection and basic text formatt... | [
0.19460488855838776,
0.07824651151895523,
0.4133514165878296,
0.10504718869924545,
0.1227240115404129,
-0.01646597683429718,
0.0970316231250763,
0.08639393746852875,
-0.3217766582965851,
-0.647575855255127,
-0.0678497850894928,
0.42633575201034546,
-0.025152694433927536,
-0.029531680047512... | |
implement this?
You can implement it very easily in WPF.
1. Create an ObservableCollection of Log entities and bind to a ListBox.
2. Give a DataTemplate for the ListBox.ItemTemplate.
\*When running in real time you need either UI side or Data side virtualization
Check out my [PaginatedObservableCollection](http://job... | [
0.1833343356847763,
-0.34949102997779846,
0.29172539710998535,
0.21502667665481567,
0.008242739364504814,
-0.33770784735679626,
0.16083690524101257,
-0.16752302646636963,
-0.25316792726516724,
-0.6059587597846985,
0.14398424327373505,
0.4764997363090515,
-0.36611634492874146,
-0.0698374062... | |
Reviewing Conery's storefront, and I dont understand why he used Linqs auto-generated classes (ie Order class) and then he has another Order class defined that is not a partial class. WHen using repository pattern should one manually create the classes, and disregard Datacontext altogether?
If you don't decouple your f... | [
0.15741342306137085,
-0.007555131800472736,
-0.04366640746593475,
0.35682690143585205,
-0.12446822971105576,
-0.21353843808174133,
0.08562183380126953,
-0.1704011857509613,
-0.04581017047166824,
-0.31519967317581177,
0.2567158043384552,
0.47096025943756104,
-0.24813376367092133,
-0.0024115... | |
sql context:
```
using (MyDataContext data = new MyDataContext())
{
SomeThing thing = data.Things(t => t.ID == 1);
return thing;
}
... the MyDataContext instance is gone
```
With the "using" block, you're disposing of the instance of MYDataContext at the last "}". However, if you do this you'll get an error ... | [
0.10493408143520355,
0.08508343994617462,
0.21093450486660004,
-0.010381430387496948,
0.07854444533586502,
-0.32097238302230835,
0.23824654519557953,
-0.20211218297481537,
-0.004281067755073309,
-0.4418210983276367,
-0.18860295414924622,
0.6503217220306396,
-0.32315218448638916,
0.17222777... | |
rid of your data context instance and return the same data (just in a different object):
```
using (MyDataContext data = new MyDataContext())
{
SomeThing thing = data.Things(t => t.ID == 1);
SometThingElse otherThing = ConvertSomethingToSomethingElse(thing);
return otherThing;
}
... the MyDataContext insta... | [
-0.03793197125196457,
-0.20223355293273926,
0.4095813035964966,
0.06659455597400665,
0.20553463697433472,
-0.21051299571990967,
0.5950705409049988,
-0.27611035108566284,
-0.15693512558937073,
-0.6670752763748169,
-0.044962842017412186,
0.605832576751709,
-0.2671663165092468,
0.386600404977... | |
I was asking a related question but messed the title up and no-one would understand it. Since I am able now to ask the question more precisely, I decided to reformulate it in a new question and close the old one. Sorry for that.
So what I want to do is passing data (my custom user's nickname as stored in the db) to th... | [
0.33770322799682617,
0.24071812629699707,
0.3520715832710266,
-0.14683932065963745,
-0.20478835701942444,
-0.10914282500743866,
0.4867457449436188,
-0.012111683376133442,
-0.03460405766963959,
-0.6344599723815918,
-0.3172313868999481,
0.5349000096321106,
-0.1022871881723404,
0.258894264698... | |
each and every action of every controller, so I decided to use [this approach](http://www.asp.net/Learn/mvc/tutorial-13-cs.aspx) and create an abstract base controller which will do the work for me, like so:
```
public abstract class ApplicationController : Controller
{
private IUserRepository _repUser;
... | [
-0.17184242606163025,
-0.3767700493335724,
0.638769268989563,
0.1535242199897766,
0.18886077404022217,
0.10641422867774963,
0.20368419587612152,
-0.44469690322875977,
-0.7366346716880798,
-0.6121594905853271,
-0.38003024458885193,
0.47083428502082825,
-0.5124567151069641,
0.248702257871627... | |
ViewData["LoggedInUser"] = loggedInUser;
}
}
```
This way, whatever my deriving Controller does, the user information will already be present.
So far, so good. Now for the problem:
I can't call User.Identity.Name because `User` is already null. This is not the case in all of my deriving controllers, so ... | [
0.007761204149574041,
-0.10593447089195251,
0.5347726941108704,
-0.2779228985309601,
-0.02540600299835205,
0.0002940719132311642,
0.12194418907165527,
0.013802850618958473,
-0.23837760090827942,
-0.770453929901123,
-0.0047643110156059265,
0.6863623857498169,
-0.24431133270263672,
0.2644165... | |
to me like the HttpContext is not available (since also null ;-) and that I am missing a simple yet important point here. Can anyone give me some hints? I would really appreciate it.
My guess would be that the Controller's base constructor is not filling in the User, but that it is only known later when the ControllerC... | [
0.1836739480495453,
-0.284755140542984,
0.6702172160148621,
0.27383649349212646,
0.226964071393013,
-0.41016894578933716,
0.15122635662555695,
0.24180461466312408,
-0.25293806195259094,
-0.6980783939361572,
-0.1030065044760704,
0.4015715420246124,
-0.08080985397100449,
0.2269534468650818,
... | |
check the source code of MVC.
from the code that I have of MVC (also a preview version, but that should be fine):
(In Controller)
```
public IPrincipal User {
get {
return HttpContext == null ? null : HttpContext.User;
}
}
```
...
```
public HttpContextBase HttpCont... | [
-0.03020586632192135,
-0.3249838352203369,
0.7286224961280823,
0.13947515189647675,
-0.05234450846910477,
-0.13314427435398102,
0.10857385396957397,
0.10446517169475555,
-0.2097814977169037,
-0.9051024317741394,
-0.1387033760547638,
0.646170973777771,
-0.27367302775382996,
0.28405502438545... | |
return ControllerContext == null ? null : ControllerContext.HttpContext;
}
}
```
I don't see en an implementation of a default constructor in the code.
That would prove that the ControllerContext is null at the time of construction.
So you should execute your code somewhere else. | [
0.03003828227519989,
0.016686344519257545,
0.2931897044181824,
0.08327585458755493,
0.16993381083011627,
-0.2925010323524475,
0.3983619213104248,
-0.0023417090997099876,
0.1273801326751709,
-0.7755998373031616,
-0.25424426794052124,
0.4353790879249573,
-0.40539243817329407,
0.3336933553218... | |
Ok, this may be a dumb question but here goes. I noticed something the other day when I was playing around with different HTML to PDF converters in PHP. One I tried (dompdf) took forever to run on my HTML. Eventually it ran out of memory and ended but while it was still running, none of my other PHP scripts were respon... | [
0.6087404489517212,
0.037540022283792496,
0.10702962428331375,
0.3191123902797699,
-0.27686432003974915,
-0.384357213973999,
0.5002337694168091,
0.19025982916355133,
-0.2813026010990143,
-0.44722580909729004,
0.4750940501689911,
0.31528419256210327,
-0.34713688492774963,
0.271451860666275,... | |
in?
did you had open sessions for each of the scripts?:) they might reuse the same sesion and that blocks until the session is freed by the last request...so they basically wait for each other to complete(in your case the long-running pdf generator). This only applies if you use the same browser.
Tip, not sure why you... | [
0.1346101313829422,
-0.2585233449935913,
0.3542093336582184,
0.08773214370012283,
-0.4116770327091217,
-0.3809964954853058,
0.07090248167514801,
-0.038032498210668564,
-0.23094461858272552,
-0.503883957862854,
0.16286447644233704,
0.2542308270931244,
0.00622545275837183,
-0.299845188856124... | |
I have a "description" field indexed in Lucene.This field contains a book's description.
How do i achieve "All of these words" functionality on this field using BooleanQuery class?
For example if a user types in "top selling book" then it should return books which have all of these words in its description.
Thanks!
Th... | [
0.21519117057323456,
0.10626146197319031,
0.22083596885204315,
0.27764180302619934,
-0.16536453366279602,
-0.14265410602092743,
0.05001479759812355,
-0.1375822126865387,
0.010016958229243755,
-0.663739025592804,
0.08000202476978302,
0.4211263060569763,
0.18812796473503113,
0.31256681680679... | |
that [come with Lucene](http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc/) - have a look in the `org.apache.lucene.analysis` package. There are options for many different languages, stemming, stopwords and so on.
For #2, there are again a lot of query parsers that come with Lucene, mainly in the `org.apa... | [
-0.13567312061786652,
-0.26127123832702637,
0.18121887743473053,
0.1101144403219223,
-0.07089871168136597,
-0.03295138478279114,
0.038674451410770416,
-0.061675626784563065,
-0.04404998570680618,
-0.630321204662323,
-0.12866871058940887,
0.45775938034057617,
-0.07060876488685608,
-0.287104... | |
I'm currently trying to extend a friend's OCaml program. It's a huge collection of functions needed for some data analysis.. Since I'm not really an OCaml crack I'm currently stuck on a (for me) strange List implementation:
```
type 'a cell = Nil
| Cons of ('a * 'a llist)
and 'a llist = (unit -> 'a cell);;
```
I... | [
0.10334936529397964,
0.33454564213752747,
0.34448301792144775,
0.0023599411360919476,
0.15064366161823273,
-0.24752502143383026,
0.3287336230278015,
0.3864433467388153,
-0.31695520877838135,
-0.832059383392334,
-0.0010870486730709672,
0.0655871108174324,
-0.20848067104816437,
0.51345938444... | |
do that?
Any help would really be appreciated!
```
let rec append l1 l2 =
match l1 () with
Nil -> l2 |
(Cons (a, l)) -> fun () -> (Cons (a, append l l2));;
let rec map f l =
fun () ->
match l () with
Nil -> Nil | | [
-0.25273293256759644,
-0.5216785073280334,
0.4603835642337799,
-0.20831994712352753,
-0.043801091611385345,
-0.1780913919210434,
-0.07150227576494217,
-0.2571355998516083,
-0.11227604001760483,
-0.590627908706665,
-0.4782731235027313,
0.8851332664489746,
-0.5332114100456238,
-0.37747958302... | |
(Cons (a, r)) -> fun () -> (Cons (f a, map f r));;
```
The basic idea of this implementation of lazy lists is that each computation is encapsulated in a function (the technical term is a closure) via fun () -> x.
The expression x is then only evaluated when the function is applied to () (the unit value, which contain... | [
-0.19415885210037231,
0.07742150872945786,
0.2725253701210022,
-0.03394351154565811,
-0.12074772268533707,
0.029548559337854385,
0.001261300640180707,
-0.1131318137049675,
-0.3348246216773987,
-0.32009565830230713,
-0.5298153162002563,
0.5741637349128723,
-0.6955035328865051,
-0.0662877857... | |
I am developing a site in vertigoserver. Now I need to test the webpage in webserver.
I am using the webserver Host-Europe VirtualServer 3.0.
1. Now what are the steps I need to upload the PHP pages?
2. What is the software needed to upload MySQL queries?
3. Are there any tutorials or suggestions?
This seems like bas... | [
0.40320727229118347,
0.12962721288204193,
0.6197411417961121,
0.1788523942232132,
-0.2841382622718811,
-0.1294964849948883,
0.12127454578876495,
-0.1318652331829071,
-0.2145640254020691,
-0.36822712421417236,
0.535834789276123,
0.3505801558494568,
-0.0033512318041175604,
-0.031797830015420... | |
restore a database dump. If you have shell access, or if the MySQL server is open to the Internet, you can pipe the dump into the MySQL command line client, for example,
```
mysql -h<hostname> -u<username> -p<password> mydatabase < dump.mysql
``` | [
0.2326515018939972,
0.16629940271377563,
0.3275565505027771,
-0.049507688730955124,
0.03809965029358864,
-0.31889185309410095,
0.31302669644355774,
0.2405778467655182,
-0.0813390240073204,
-0.5891781449317932,
-0.380035400390625,
0.7426837086677551,
-0.26335224509239197,
0.3766337037086487... | |
Are there any free libraries that would "print" to a PDF without actually having to install a PDF printer on the system. I want something that can be completely self contained in my application. The reason I say I want it to "print" is that I've tried and tried to find a solution for directly converting from HTML with ... | [
0.6024729013442993,
0.19636450707912445,
0.44450435042381287,
0.21531619131565094,
-0.21651437878608704,
-0.37131819128990173,
-0.10176052153110504,
0.09543716162443161,
-0.29804888367652893,
-0.9549959897994995,
-0.016151348128914833,
0.4744069576263428,
-0.19954094290733337,
0.0189842712... | |
PDFPrinter.
[PDFsharp](http://pdfsharp.com/) | [
-0.02343972586095333,
-0.1755618304014206,
0.43262115120887756,
0.18856661021709442,
-0.03292209655046463,
-0.4598364531993866,
0.0503748320043087,
0.05522109195590019,
-0.2972114384174347,
-0.36013922095298767,
-0.5708932280540466,
0.1105438843369484,
0.05614646524190903,
-0.0941566079854... | |
Right, I'm trying to get a label with text in it (done already obviously), which scrolls across the screen.
The text that is input into the label is done by a UITextField and a UIButton. This updates fine.
But I'm trying to get the UILabel to resize accordingly to the amount of text input, so that the WHOLE lot of te... | [
-0.14270852506160736,
-0.0009195653256028891,
0.9336780905723572,
-0.02011784538626671,
-0.06886107474565506,
-0.040060028433799744,
0.020421437919139862,
-0.2489996999502182,
-0.22416171431541443,
-0.953048825263977,
-0.03602262958884239,
0.6143760085105896,
-0.0207959096878767,
0.1406565... | |
in the middle of the screen, and sometimes vanishes before it has fully gone acrosss.
It also cuts of text due to the label being one size.. I don't know how to change this.
Thanks in advance.
Dom
I believe something similar to [the solution for this question](https://stackoverflow.com/questions/419710/how-do-i-pan-... | [
0.23117631673812866,
-0.2175893634557724,
0.640162467956543,
0.06729220598936081,
-0.15464100241661072,
-0.03093864768743515,
0.12150952219963074,
-0.10232195258140564,
-0.3283434212207794,
-0.8735257387161255,
-0.05012550577521324,
0.25790655612945557,
-0.11100513488054276,
0.426897197961... | |
you could do the following:
```
[lblMessage setText: txtEnter.text];
[lblMessage sizeToFit];
scrollView.contentSize = lblMessage.frame.size;
```
followed by the panning animation code as described in the above-linked question, with the frame to be panned to being the far right of the UILabel. This would cause the te... | [
0.3615541160106659,
-0.19650019705295563,
0.7659872770309448,
0.07127098739147186,
-0.05725470930337906,
0.10520825535058975,
-0.043429624289274216,
-0.38662996888160706,
-0.1259690523147583,
-0.7492681741714478,
-0.2539370357990265,
0.5450534224510193,
-0.21411973237991333,
0.211599752306... | |
I'll try to be brief.
What is the best practice for calling a routine from an asp.net web application that initiates a lengthy 'background' process that must be run?
For example, I want to click a button on my webpage that says "Run data conversion" (for example). This data conversion routine may take 20-40 minutes ... | [
0.7574111223220825,
-0.07165005803108215,
0.1408601999282837,
-0.09808839112520218,
0.07571634650230408,
-0.30685609579086304,
0.47820454835891724,
-0.0020912347827106714,
-0.36077165603637695,
-0.5045218467712402,
0.03099081851541996,
0.5721554756164551,
-0.23561178147792816,
-0.070648208... | |
app, and the background process will both run on my dedicated Win2003 server so I have lots of options - but what is the best one?
There are quite a few options, basically it boils down to you needing any sort of process that you can communicate with. The options I can think of off the top of my head are; a web-service... | [
0.2444685846567154,
0.13033829629421234,
0.340111643075943,
0.19377493858337402,
0.11208826303482056,
0.3610737919807434,
0.1357734054327011,
0.031134501099586487,
-0.38950756192207336,
-0.9060497879981995,
-0.010395830497145653,
0.7166524529457092,
-0.3411266803741455,
-0.0087602445855736... | |
both processes can access. The website would place the request for work into a table that the second process would monitor. A second table could then be used for the results, which the web-site would monitor. Another option would be to use something like the [Windows Communication Foundation (WCF)](http://en.wikipedia.... | [
0.28564271330833435,
-0.2613820731639862,
0.3101201355457306,
0.20255926251411438,
0.04130351543426514,
-0.1254315823316574,
-0.05086549371480942,
-0.09862498193979263,
-0.383846253156662,
-0.7156422734260559,
-0.20594698190689087,
0.4661022424697876,
-0.15039923787117004,
0.19199311733245... | |
Say I add a function to an outstanding Interface.
In Visual Studio, within a class which implements it I can right click the Interface declaration and re-implement it. This will update the code to reflect the changes made. Is there anyway to do the same thing in eclipse?
It'd be nice if there was.
I've searched the net... | [
0.27898943424224854,
-0.14130164682865143,
0.3322054445743561,
-0.021690623834729195,
-0.33796226978302,
0.015838421881198883,
0.2150166928768158,
0.042787760496139526,
-0.118159718811512,
-0.6754631400108337,
-0.11827307194471359,
0.9821022748947144,
-0.1520494818687439,
-0.20422366261482... | |
substitute `⌘` for `CTRL`. | [
0.022269872948527336,
-0.020076530054211617,
0.031559739261865616,
-0.08651340752840042,
-0.41971728205680847,
-0.11031948029994965,
-0.1994919776916504,
0.15189526975154877,
-0.06424751877784729,
-0.3153038024902344,
-0.45056024193763733,
0.25951167941093445,
-0.0011982161086052656,
-0.18... | |
I am trying out Linq to SQL in an ASP.NET application that uses a large database with lots of foreign keys (100+ tables). I am impressed with how Linq permits you to create a datacontext with all of your relationships intact and to then create Linq statements that automatically join tables. However, this leads to a que... | [
0.08535359799861908,
0.3625515401363373,
0.2917027771472931,
0.09584467858076096,
-0.222585067152977,
-0.2347983419895172,
0.04579200595617294,
-0.26380184292793274,
0.0067324102856218815,
-0.37422844767570496,
0.08896781504154205,
0.38733068108558655,
-0.29991623759269714,
-0.093457207083... | |
in the database, it would be quite massive and loading it for every use of Linq would have a negative impact on performance. Am I right?
Comment: I know to create the datacontext only as needed (but thank you nonetheless for mentioning it). The question is really about whether I should have lots of little datacontexts... | [
0.38784778118133545,
0.1137310266494751,
0.1365591436624527,
0.41541436314582825,
0.007168274838477373,
-0.10841705650091171,
0.040016114711761475,
-0.01145316194742918,
-0.36428970098495483,
-0.6347583532333374,
0.0630076602101326,
0.378269761800766,
-0.08229022473096848,
0.01073022652417... | |
modify together, you might consider several DataContexts. If you even **might** need to query across DataContexts, do not separate them.
A DataContext is not just a set of tables - it is meant to be an implementation of the Data Gateway pattern - you can fill it with methods that return the data you need, so you don't... | [
0.19962731003761292,
0.19017954170703888,
0.32540661096572876,
0.40317997336387634,
-0.09281321614980698,
0.03740464523434639,
0.08910705894231796,
-0.1786474734544754,
-0.3671588897705078,
-0.9688759446144104,
-0.05457524582743645,
0.4243418574333191,
-0.45000067353248596,
0.3050513565540... | |
the answer is that it is usually not OK to build many small DataContexts. This is only feasible if your data is completely separate (different logical or physical databases) or if you are using DataContext as simply a Connection object, which it is not meant to be.
Do note however, that DataContexts should be short-li... | [
-0.05659713223576546,
-0.01830551214516163,
0.35740330815315247,
0.3967728018760681,
-0.03421410545706749,
-0.28247538208961487,
0.19087141752243042,
0.21213127672672272,
-0.23401805758476257,
-0.6382039189338684,
-0.17967401444911957,
0.3074067234992981,
-0.15962569415569305,
0.2845822870... | |
them just because. | [
0.6379425525665283,
0.14492258429527283,
-0.024610163643956184,
0.14655587077140808,
-0.40052664279937744,
0.263241708278656,
0.33778753876686096,
0.009216945618391037,
-0.5067152976989746,
-0.07147887349128723,
-0.0029634584207087755,
0.34254950284957886,
-0.41574710607528687,
0.165215924... | |
For an ASP.NET C# application, we will need to restrict access based on IP address. What is the best way to accomplish this?
In IIS 7 best way to restrict IP is by using the config file.
Full article:
<http://boseca.blogspot.com/2010/12/programmatically-addremove-ip-security.html> | [
0.12620483338832855,
-0.23110930621623993,
0.5311195254325867,
0.005875697359442711,
0.022313369438052177,
-0.35636675357818604,
0.012551136314868927,
-0.20387393236160278,
-0.37677326798439026,
-0.2912728190422058,
-0.17245015501976013,
0.2918573021888733,
-0.4717599153518677,
-0.00870273... | |
I am developing a small business application which uses Sqlserver 2005 database.
Platform: .Net framework 3.5;
Application type: windows application;
Language: C#
Question:
I need to take and restore the backup from my application. I have the required script generated from SSME.
How do I run that particular script ... | [
0.24684464931488037,
0.2116156667470932,
0.2647571265697479,
-0.08552547544240952,
0.16372083127498627,
-0.11861609667539597,
0.1538890153169632,
-0.01971725933253765,
-0.07330774515867233,
-0.5237584710121155,
-0.09360545128583908,
0.7342004179954529,
-0.015754029154777527,
0.141764506697... | |
I have XAMP 1.6.8 and IIS 5.0 installed on my PC(Windows XP SP3).
I'm unable to run them simultaneously. If IIS service is running, Apache throws the following error:
(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make\_sock: could not bind to address 0.0.0.0:... | [
-0.014954766258597374,
0.17318448424339294,
0.5449737310409546,
-0.39317452907562256,
-0.28241631388664246,
-0.21337413787841797,
0.6999245882034302,
-0.3011198341846466,
-0.0999331995844841,
-0.75565505027771,
-0.014519816264510155,
0.7337960600852966,
-0.46756839752197266,
0.042552314698... | |
service-specific error code 1.
---
### Edit:
Apache runs on a different port 3128. And IIS (asp.net) usually runs on a different port.
"could not bind to address 0.0.0.0:80" means that, when it starts up, it tries to bind to port 80 on all available network interfaces. As IIS already has hogged one (or more) IPs to ... | [
0.16787561774253845,
-0.14461754262447357,
0.06807205080986023,
-0.014659282751381397,
-0.13529516756534576,
-0.5025563836097717,
0.734897255897522,
-0.05200475826859474,
-0.2985509932041168,
-0.879751980304718,
-0.1889137327671051,
0.25364750623703003,
-0.32330355048179626,
0.223817646503... | |
address), or to bind to a different IP or range of IPs.
You do this by [changing the binding](http://httpd.apache.org/docs/2.0/bind.html). First find the Listen directive in the configuration file (httpd.conf) and change it. Currently it will say `"Listen 80"` (meaning all IPs), change it to say "`Listen 192.168.0.2:8... | [
0.504284679889679,
-0.10935956984758377,
0.6982050538063049,
-0.10712576657533646,
0.0662771463394165,
-0.5749120712280273,
0.37251171469688416,
-0.48802661895751953,
-0.07916905730962753,
-1.0022099018096924,
-0.2563028335571289,
0.9138197898864746,
-0.32200902700424194,
-0.01267525833100... | |
I am designing a psychology experiment with java applets. I have to make my java applets full screen. What is the best way of doing this and how can I do this.
Since I haven't been using java applets for 3 years(The last time I've used it was for a course homework :) ) I have forgotten most of the concepts. I googled... | [
0.5264514684677124,
0.2948043942451477,
0.07816310226917267,
-0.1425069272518158,
-0.039822448045015335,
-0.03113957867026329,
0.45925959944725037,
0.1185983344912529,
-0.21823447942733765,
-0.626850426197052,
0.4919946789741516,
0.439482182264328,
-0.07817967981100082,
0.13363134860992432... | |
method b'cause I don't have much time and this is the reason why I asked it here.
Thanx in advance
I think you want to use WebStart. You can deploy from a browser but it is otherwise a full blown application. There are a few browserish security restrictions, but, as you're using an Applet currently, I think I can assu... | [
0.5262662172317505,
-0.13216902315616608,
0.16539449989795685,
0.0508580319583416,
-0.10315938293933868,
-0.26599225401878357,
0.17862410843372345,
0.16341142356395721,
-0.17957060039043427,
-0.40055105090141296,
0.24312399327754974,
0.45647963881492615,
-0.38928502798080444,
0.04793742671... | |
Quick one, but thought I'd ask.
Is there a better way of getting the column values from a model's column than something like this?
```
Item.count(:all, :group => 'status').reject! { |i, e| i.blank? }.collect { |i,e| i}
```
```
Item.find(:all, :select=>:status, :group => 'status', :conditions => "status != ''").colle... | [
-0.3556744158267975,
-0.29139670729637146,
0.17951370775699615,
0.283424973487854,
-0.1127871498465538,
0.21879367530345917,
0.15725426375865936,
-0.5266383290290833,
-0.36828210949897766,
-0.5679923295974731,
-0.1808922439813614,
0.40962010622024536,
-0.45302361249923706,
-0.0471148565411... | |
Using POSIX threads & C++, I have an "Insert operation" which can only be done safely one at a time.
If I have multiple threads waiting to insert using pthread\_join then spawning a new thread
when it finishes. Will they all receive the "thread complete" signal at once and spawn multiple inserts or is it safe to assu... | [
0.2617189884185791,
0.1120360940694809,
0.3491867184638977,
-0.2946055233478546,
0.2837024927139282,
-0.25850194692611694,
0.3042852282524109,
-0.17536212503910065,
-0.16255012154579163,
-0.6015186309814453,
-0.2068108320236206,
0.7139514684677124,
-0.33402320742607117,
0.1528232991695404,... | |
new one
pthread_create(&insertThread, NULL, Insert, Data);
```
---
Thank you for the replies
The program is basically a huge hash table which takes requests from clients through Sockets.
Each new client connection spawns a new thread from which it can then perform multiple operations, specifically lookups or inser... | [
0.2798667550086975,
-0.1364840567111969,
0.4623746871948242,
0.07864858210086823,
0.09189978241920471,
0.17828592658042908,
-0.018900636583566666,
-0.1817031353712082,
-0.2632232904434204,
-0.8951797485351562,
0.0032565307337790728,
0.30333760380744934,
-0.5899301171302795,
0.4777406454086... | |
much as possible.
But now that i know it's not safe the way i first thought I should be able to cobble something together
Thanks
From [opengroup.org on pthread\_join](http://opengroup.org/onlinepubs/007908799/xsh/pthread_join.html):
> The results of multiple simultaneous calls to pthread\_join() specifying the same... | [
0.11097519844770432,
-0.17779138684272766,
0.16131216287612915,
0.14927150309085846,
-0.018629170954227448,
-0.07773768156766891,
0.05340926721692085,
-0.09265550225973129,
-0.32701751589775085,
-0.6741172075271606,
0.17159852385520935,
0.6042752861976624,
-0.47188863158226013,
0.007727591... | |
always have to wait for the previous one to finish before you start the next one? Seems not to be classical use of multiple-threads.
Although... One classical solution to this would be to have one worker-thread getting jobs from an event-queue, and other threads posting the operation onto the event-queue.
If you rea... | [
0.4941170811653137,
-0.35018548369407654,
-0.08209659159183502,
-0.10502199083566666,
0.2113521546125412,
0.07694241404533386,
0.07234833389520645,
0.22169388830661774,
-0.6861993074417114,
-0.4099730849266052,
0.10225250571966171,
0.48211798071861267,
-0.450664758682251,
0.081093415617942... | |
insertion, it fires the condition variable.
* As the condition variable requires a mutex, you can just notify *all* waiting threads, they all want start inserting, but as only one thread can acquire the mutex at a time, all threads will do the insert sequentially.
But you should take care that your synchronization is ... | [
0.09304450452327728,
-0.19972343742847443,
0.03908156231045723,
-0.04992443323135376,
0.08445923775434494,
0.13952375948429108,
0.11521485447883606,
-0.29249438643455505,
-0.23056793212890625,
-0.37253931164741516,
-0.01658216118812561,
0.7339470386505127,
-0.41713008284568787,
0.006679716... | |
operations then just `insert`, which will need proper synchronization... | [
-0.12355580180883408,
0.258482426404953,
0.16643041372299194,
-0.1404595673084259,
0.5043631792068481,
-0.027717219665646553,
-0.09512779861688614,
-0.10568159073591232,
0.0063909245654940605,
-0.38915398716926575,
-0.40951645374298096,
0.8403268456459045,
-0.45206108689308167,
-0.11178818... | |
Are there any good components, free or commercial, available for Delphi (I use Delphi 2009) that will allow me to easily implement face detection and tagging of the faces in photos (i.e. graphics/images)?
I need to do something similar to what Google Picasa's Web Albums can do, but from within my application.
Here is ... | [
0.2817020118236542,
-0.04034805670380592,
0.5115143656730652,
0.20529043674468994,
-0.10654690861701965,
-0.1469920575618744,
-0.403836727142334,
0.09181709587574005,
-0.38999471068382263,
-0.37312349677085876,
0.24271045625209808,
0.7610425353050232,
0.14320968091487885,
-0.36347040534019... | |
When doing thread synchronization in C# should I also lock an object when I read a value or just changing it?
for example I have Queue<T> object. Should I just lock it when doing the Enqueue and Dequeue or should I also lock it when checking values like Count?
From MSDN:
> A Queue<(Of <(T>)>) can support
> multiple ... | [
0.1219896748661995,
-0.24645188450813293,
0.32208916544914246,
0.12950067222118378,
0.03617800027132034,
-0.24373112618923187,
0.23056575655937195,
-0.10555491596460342,
-0.44942188262939453,
-0.4576428234577179,
-0.05124502629041672,
0.5153548121452332,
-0.5750122666358948,
0.252785235643... | |
To allow the
> collection to be accessed by multiple
> threads for reading and writing, you
> must implement your own
> synchronization.
You should ensure no reader is active while an item is queued (a lock is probably a good idea).
Looking at the count in reflector reveals a read from a private field. This can b... | [
0.3183118402957916,
-0.1633346527814865,
0.5081350803375244,
0.11002526432275772,
-0.16544145345687866,
-0.2251923382282257,
0.3056139051914215,
-0.3595665693283081,
-0.2913200557231903,
-0.7229854464530945,
0.11604522168636322,
0.5751913785934448,
-0.48532634973526,
0.2124783843755722,
... | |
When using Eclipse or NetBeans IDE on a Java project I get to see where errors in my code are, before and after compiling. The line causing the issue is shown. I remember that back in the old days, the Visual C++ 98' edition did do underlining of errors in the code. Is there a way to enable this in Visual C++ 2005? Or ... | [
0.353646844625473,
0.25010403990745544,
-0.10654643923044205,
-0.06760206818580627,
-0.31042972207069397,
-0.4140605926513672,
0.2559087872505188,
0.12709234654903412,
-0.2497090846300125,
-0.5700854063034058,
0.23382338881492615,
0.8234859108924866,
-0.32680150866508484,
-0.15151725709438... | |
open-source static code analyzers that plug into VS2005, but there are some commercial ones. One such product that has been well-received is [Riverblade's Visual Lint](http://www.riverblade.co.uk/products/visual_lint/index.html).
In general, Googling "visual c++ static code analysis" is a good place to start hunting t... | [
0.20383179187774658,
-0.22122932970523834,
0.28432929515838623,
0.32482609152793884,
-0.21160578727722168,
-0.38151732087135315,
0.11147353798151016,
0.2230428159236908,
-0.3847197890281677,
-0.25984713435173035,
-0.02456345409154892,
0.4257242679595947,
-0.4018053412437439,
-0.12135876715... | |
This question is inspired by Jon Skeet's answer:
[Is there a c# equivalent to c++'s access-modifier regions](https://stackoverflow.com/questions/431091/is-there-a-c-equivalent-to-cs-access-modifier-regions#431105)
He makes a comment that it is possible for the order of fields in a file to matter. I am guessing that th... | [
0.05033203586935997,
-0.018499193713068962,
-0.23545807600021362,
0.09967083483934402,
-0.26149046421051025,
-0.03864511474967003,
-0.21750205755233765,
-0.16025462746620178,
-0.6491346955299377,
-0.20922663807868958,
0.023338764905929565,
0.07419449090957642,
-0.31001773476600647,
0.08797... | |
the C# language spec (Section 10.5.5)
```
class Test
{
static int a = b + 1;
static int b = a + 1;
static void Main() {
Console.WriteLine("a = {0}, b = {1}", a, b);
}
}
```
This is a completely valid program and as written (a = 1, b =2). However if you swap the ordering of the fields they wil... | [
0.5372463464736938,
-0.04392465576529503,
0.0723179429769516,
-0.18305975198745728,
0.09207811951637268,
-0.33397015929222107,
0.2423166036605835,
-0.126048281788826,
0.3240635097026825,
-0.23373165726661682,
-0.26803329586982727,
0.6164438724517822,
-0.4168531596660614,
0.1924370080232620... | |
As an addition to my previous post on [Creating a web server in pure C](https://stackoverflow.com/questions/409087/creating-a-web-server-in-pure-c), I'm having some trouble with the Sending function. Here's two code snippets:
```
int Send(char *message)
{
int length, bytes_sent;
length = strlen(message... | [
0.11956000328063965,
0.03115716017782688,
0.6674795746803284,
-0.25232136249542236,
-0.40635186433792114,
-0.1369551420211792,
0.2880041301250458,
0.11402436345815659,
-0.1540621817111969,
-0.788480818271637,
-0.08298099040985107,
0.5036609768867493,
-0.402213990688324,
0.2743869125843048,... | |
char *head = "\r\nHTTP/1.1 ";
char *content_head = "\r\nContent-Type: ";
char *server_head = "\r\nServer: PT06";
char *length_head = "\r\nContent-Length: ";
char *date_head = "\r\nDate: ";
char *newline = "\r\n";
char Content_Length[100];
int content_length = strl... | [
-0.11259915679693222,
-0.1685090959072113,
0.7794720530509949,
-0.3064996898174286,
0.08596169203519821,
-0.03317490965127945,
0.439951092004776,
0.012235241942107677,
-0.15061485767364502,
-0.5889856815338135,
-0.6313444972038269,
0.12240316718816757,
-0.09832261502742767,
0.3550631403923... | |
char *message = malloc((
strlen(head) +
strlen(content_head) +
strlen(server_head) +
strlen(length_head) +
strlen(date_head) + | [
-0.2748393714427948,
-0.12143680453300476,
0.37617355585098267,
-0.35930848121643066,
0.021919099614024162,
0.33023643493652344,
0.5529207587242126,
0.20443058013916016,
-0.0779687687754631,
-0.2307080775499344,
-0.2326309084892273,
-0.0820850357413292,
-0.26015573740005493,
0.378541260957... | |
strlen(newline) +
strlen(Status_code) +
strlen(Content_Type) +
strlen(Content_Length) +
content_length +
sizeof(char)) * 2); | [
-0.09410595148801804,
-0.37577706575393677,
0.6048885583877563,
-0.307790070772171,
0.26448068022727966,
-0.12533031404018402,
0.2748810350894928,
-0.2981034815311432,
-0.09071478992700577,
-0.5474451184272766,
-0.5978235602378845,
0.3292160928249359,
-0.3573918342590332,
0.188509464263916... | |
if ( message != NULL )
{
time_t rawtime;
time ( &rawtime );
strcpy(message, head);
strcat(message, Status_code);
strcat(message, | [
-0.07617311924695969,
-0.45377281308174133,
0.38215377926826477,
-0.33639100193977356,
0.28252625465393066,
0.19462953507900238,
0.5100678205490112,
0.0027885134331882,
-0.006686263717710972,
-0.7014108300209045,
-0.4823809862136841,
0.27277520298957825,
-0.28830888867378235,
0.21819919347... | |
content_head);
strcat(message, Content_Type);
strcat(message, server_head);
strcat(message, length_head);
strcat(message, Content_Length);
strcat(message, date_head); | [
-0.1765357106924057,
-0.2043936848640442,
0.8477373123168945,
-0.2824079692363739,
-0.19055338203907013,
0.29600340127944946,
0.20780321955680847,
0.3379068374633789,
-0.2805384397506714,
-0.5749158263206482,
-0.5946269035339355,
-0.2314765304327011,
-0.2986961007118225,
0.4782892167568207... | |
strcat(message, (char*)ctime(&rawtime));
strcat(message, newline);
strcat(message, HTML);
Send(message);
free(message);
}
}
```
If I were to add
```
Send("Oh end of HTML Sending eh?");
```
after `Send(message)` and before `free(message)... | [
0.03527939319610596,
0.1392383575439453,
0.8363866806030273,
-0.4312862753868103,
-0.3144111633300781,
0.21565496921539307,
0.4368075132369995,
-0.22317758202552795,
-0.11218886077404022,
-0.744227409362793,
-0.5452088713645935,
0.33470916748046875,
-0.4269435703754425,
-0.0166216529905796... | |
browser?
I figured this might be a HTTP 1.1 issue, does the RFC say that i can only do one Send? Does the browser Close the connection after it receives the first message?
How do I solve this so I could do the following:
```
SendHTML("200 OK", "text/plain", "HAaaaii!!");
Send("lolwut?");
```
This should result in ... | [
0.37334781885147095,
0.18623705208301544,
0.6185981035232544,
-0.10652419179677963,
-0.288553386926651,
-0.15677578747272491,
0.5301843285560608,
0.12483680993318558,
-0.3099607825279236,
-0.6368760466575623,
-0.2880586087703705,
0.41694673895835876,
-0.3317177891731262,
0.0412627607583999... | |
using keep-alive and therefore can't handle more than one request per TCP connection.
Handling more than one Request-Response exchange per TCP connection can greatly speed up browsing speed, since a normal web-page consists of several separate resources, each of which will have to be requested separately. And since es... | [
0.4427188038825989,
-0.12650592625141144,
0.42846933007240295,
0.2899138629436493,
-0.015994321554899216,
-0.4415735900402069,
0.40617993474006653,
-0.22536925971508026,
-0.3440605700016022,
-0.52735435962677,
0.07447324693202972,
0.2370970994234085,
-0.463754802942276,
0.13477957248687744... | |
I went through a period of being interested in how quantum computers work and what they might be good for if they ever become practical. I know they are talked about for code-breaking. [I was interested is using them for validating software by essentially trying all possible inputs (in parallel) and seeing if any error... | [
0.43728092312812805,
0.095293328166008,
-0.11504568159580231,
0.25087231397628784,
-0.040059495717287064,
0.04965042322874069,
0.04669976606965065,
0.2484545111656189,
-0.275906503200531,
-0.3238207697868347,
-0.04464683681726456,
0.3462012708187103,
0.12037021666765213,
0.2409214675426483... | |
of memory to play with. Suppose you can load those bits (or some of them) with your input data. Then suppose there is a finite sequence of operations you can do on them (without using any additional memory) leaving the answer in them.
To do this with a quantum computer, it is only necessary that you make sure that the... | [
-0.21772290766239166,
-0.19280247390270233,
-0.0009506492060609162,
0.29396817088127136,
0.40834853053092957,
0.07305511832237244,
-0.11858320236206055,
-0.32015013694763184,
-0.37192484736442566,
-0.27273595333099365,
-0.2947479486465454,
0.5962271094322205,
-0.16445821523666382,
0.155514... | |
unitary transform is a pure rotation in the N-dimensional coordinate system.) So performing the computation consists of applying a succession of pure rotations on the bit-vector.
If you do this, then if the N-bit vector is in a quantum computer, it can be initialized into a state where all 2^N (or fewer) possible inpu... | [
0.3169616460800171,
-0.5265722274780273,
0.27753743529319763,
-0.07126045227050781,
-0.21858875453472137,
-0.05980558693408966,
0.04154426231980324,
-0.4052155911922455,
0.05516912043094635,
-0.361885666847229,
-0.0456417091190815,
0.4838923215866089,
-0.4277964234352112,
0.267392724752426... | |
a particular state. If you halt it and examine the state, what it does is choose one of the universes at random and throw away all the rest. So what the Grover algorithm lets you do is, without halting it, accentuate the probability of the universes with the answer state. Then you run it forward, then backward, then fo... | [
-0.24996599555015564,
-0.03728092461824417,
-0.20387081801891327,
0.3304605484008789,
-0.18680071830749512,
0.3686005473136902,
0.26774463057518005,
0.22448982298374176,
-0.055956095457077026,
-0.604278028011322,
-0.24640728533267975,
0.001552312751300633,
-0.3762562870979309,
0.3549137711... | |
to give a small presentation to the class on a certain subject, my subject being AI Applications. My subject in this presentation was Quantum Computing in AI.
If the information I write here is out-of-date/wrong/poor don't be too angry. I'm only a second-year CS student at a crappy university that is relying on his me... | [
0.2349647581577301,
-0.01844746246933937,
-0.09048890322446823,
0.18878784775733948,
-0.08569640666246414,
-0.24938249588012695,
0.2170974463224411,
0.38075265288352966,
-0.14161798357963562,
-0.33275628089904785,
0.058552566915750504,
0.2155739814043045,
0.08882124722003937,
0.05832933634... | |
develop and stress-test the various methods of secure systems. If you're interested in Physics then this is the subject for you! If you want to read more about how Quantum Computers can be used in security by using Algorithms to factorise large numbers [read this paper by Peter Shor](http://fy.chalmers.se/~delsing/QI/S... | [
0.26924005150794983,
-0.10029076784849167,
0.08782940357923508,
0.07045368105173111,
-0.02194356918334961,
-0.0880744531750679,
0.002666848711669445,
-0.4954289495944977,
-0.23306050896644592,
0.12211805582046509,
-0.286917120218277,
0.5738811492919922,
-0.00451897457242012,
0.351948231458... | |
many of these computers have been built (hard-wired) to solve certain problems there are a multitude of different QLG (Quantum Logic Gates) proposed for different problems. Functionally, Quantum Networks are formed using these gates in a method known as Gate Arrays. If you require more information on this then the Eker... | [
0.011207185685634613,
-0.23013320565223694,
0.2342022955417633,
0.26710471510887146,
-0.3116926848888397,
0.34595757722854614,
0.015837693586945534,
-0.15141136944293976,
-0.3677089810371399,
-0.4776167869567871,
-0.1786162406206131,
-0.09894993156194687,
-0.3231368362903595,
0.76710969209... | |
such gate is the [Hadamard Gate](http://en.wikipedia.org/wiki/Hadamard_gate).
Quantum AI has a bright future, but not for a long time. Many academics see Quantum Computing as the distant future of Computing, similarly to how Charles Babbage viewed his machine.
Sorry if this answer got a bit out of hand. | [
0.12070130556821823,
-0.3170006275177002,
0.13744278252124786,
0.25781768560409546,
-0.07919538766145706,
-0.11480393260717392,
0.013512357138097286,
0.03947200998663902,
0.011618691496551037,
-0.6780305504798889,
-0.23847797513008118,
0.003315163776278496,
-0.22899547219276428,
0.56354081... | |
Basically the app writes the contents of a Collection to XML. I'm using XMLStreamWriter (`XMLOutputFactory.newInstance().createXMLStreamWriter(...)`) for this purpose.
Works great except for the fact that I can't get how to append data to an existing file. Don't really like the idea of reading all of it first, appendi... | [
0.07008501887321472,
0.15316711366176605,
0.575619637966156,
0.00624811789020896,
-0.05453186109662056,
-0.06185771897435188,
0.1479363590478897,
-0.08790119737386703,
-0.16916312277317047,
-0.5913802981376648,
-0.05427292361855507,
0.45045042037963867,
-0.49120426177978516,
-0.11348543316... | |
obviously screwed if there's an outer-level element, and you have to append an *inner*-level one. For instance, suppose you want to add a `some_element` element to this file:
```
<data>
<some_element>
<nested_element>
...
</nested_element>
</some_element>
</data>
```
In general, you're far better o... | [
0.04406474530696869,
0.2186267226934433,
0.3390175402164459,
0.04754910245537758,
0.18207846581935883,
-0.15262021124362946,
0.17125272750854492,
0.0999719426035881,
-0.35040196776390076,
-0.2670865058898926,
-0.27061644196510315,
0.7725958228111267,
-0.3218211233615875,
0.0212696101516485... | |
I have been thinking quite a bit here lately about screen scraping and what a task it can be. So I pose the following question.
Would you as a site developer expose simple APIs to prevent users from screen scraping, such as JSON results?
These results could then implement caching, and they are much smaller for traffi... | [
0.33858445286750793,
0.1919240802526474,
0.0609990693628788,
0.01938268542289734,
-0.2956656515598297,
0.14813128113746643,
0.09341020882129669,
-0.11108312755823135,
-0.3325974941253662,
-0.8803419470787048,
0.05898036062717438,
0.5092262029647827,
-0.17860113084316254,
0.1259804219007492... | |
freq: 1 minute
Formula:
((users \* (% / 100)) \* ((freq \* 60) \* 24)) \* filesize
10,000 \* 1440 \* 1
14400000kb or 13.73291015625gb
Assuming your JSON result is 200 bytes that's now (10,000 \* 1440 \* 0.2) or 2.74658203125gb a day.
That's a change of about 11gb of traffic a day.
---
My Stack Overflow profile ... | [
0.08311992138624191,
0.09579628705978394,
0.8612462878227234,
0.09543362259864807,
0.010186427272856236,
0.08715233206748962,
0.08570171147584915,
-0.26955047249794006,
-0.47062432765960693,
-0.7310054302215576,
-0.02935471013188362,
0.5372154712677002,
0.053821861743927,
-0.19668781757354... | |
reduce the amount of screen scraping that gets done against your site. Using a good REST API is much easier and safer than screen scraping. Screens can change without notice, and that makes screen scraping code much harder to maintain. As a developer, if I need information from a site, I'd never scrape the site if the ... | [
0.4187510311603546,
0.06371382623910904,
0.22710205614566803,
-0.12825946509838104,
-0.042523302137851715,
-0.009019041433930397,
0.2626727819442749,
0.15208876132965088,
-0.1433270424604416,
-0.9466364979743958,
0.1316947489976883,
0.8460115790367126,
0.1002824604511261,
0.182105779647827... | |
How-to Mock WCF Services Proxies with Rhino Mocks ?
Create your service so that it implements an interface. Then you can either mock the interface in your client or create a fake implementation of the interface to use in your tests. | [
0.6881511211395264,
0.26613956689834595,
0.10779818892478943,
0.3366048336029053,
-0.2175416201353073,
0.2465129941701889,
0.49212411046028137,
-0.28066813945770264,
-0.058369770646095276,
-0.5147028565406799,
0.5278149843215942,
0.4734646677970886,
-0.2458132952451706,
0.01976429112255573... | |
I have two tables in my database:
NEWS table with columns:
* `id` - the news id
* `user` - the user id of the author)
USERS table with columns:
* `id` - the user id
I want to execute this SQL:
```
SELECT * FROM news JOIN users ON news.user = user.id
```
When I get the results in PHP I would like to get associ... | [
0.12031278759241104,
0.33840879797935486,
0.365174263715744,
0.055917974561452866,
-0.10558076202869415,
0.12014458328485489,
-0.011968856677412987,
-0.0050784144550561905,
-0.05403975397348404,
-0.6413751840591431,
0.2277228981256485,
0.419389933347702,
-0.09130286425352097,
0.07852743566... | |
[OTHER FIELDS HERE] FROM news JOIN users ON news.user = user.id'
``` | [
0.513155460357666,
0.4460536539554596,
0.34108689427375793,
-0.013140222989022732,
-0.014963583089411259,
-0.3782103955745697,
0.07455858588218689,
0.37035563588142395,
-0.2721978724002838,
-0.6267252564430237,
-0.2770048975944519,
0.4347400665283203,
-0.12721200287342072,
0.40746378898620... | |
Does anyone know how well F# measures with regards to performance, compared to C#. I have a C# raytracer with a lot of vector manipulations, ray-collission algorithms etc. and thought they might be more easily expressed in F#. I'm not asking for how well F# is at expressing math problems, something which has been answe... | [
0.11049587279558182,
0.11555194109678268,
0.12827584147453308,
0.14759530127048492,
-0.2813154458999634,
-0.10110794007778168,
0.05168309807777405,
0.2908517122268677,
-0.27075663208961487,
-0.5289443731307983,
0.11855228990316391,
0.8143541216850281,
0.16929137706756592,
-0.30076527595520... | |
couldn't find (there are no results if you actually search for anything with the term 'F#'). One good point [here](https://stackoverflow.com/questions/142985/is-a-program-f-any-more-efficient-execution-wise-than-c) was the following answer:
> F# provides some performance-related
> features that can make a difference.... | [
0.10989256203174591,
-0.09159892052412033,
0.15530280768871307,
0.2391788214445114,
-0.20985886454582214,
-0.17194578051567078,
0.004706294741481543,
-0.225032240152359,
-0.20474408566951752,
-0.4452973008155823,
-0.22717958688735962,
0.5336586236953735,
-0.3366257846355438,
-0.14931517839... | |
> Finally, pattern matching can be
> extremely laborious to express in C#
> because the language lacks pattern
> matching but it is almost impossible
> to maintain optimized C# code
> equivalent to many non-trivial pattern
> matches. In contrast, the F# compiler
> aggressively optimizes pattern matches
> during... | [
0.10404980182647705,
0.030941080302000046,
-0.11988501250743866,
0.13400255143642426,
-0.35968640446662903,
-0.011932380497455597,
0.3227720856666565,
-0.23647616803646088,
-0.1677398532629013,
-0.7713443636894226,
-0.09823733568191528,
0.46319180727005005,
-0.5190236568450928,
-0.38963711... | |
in different languages (benchmarking activation function approaches for the neural networks):
**C#:**
```
10^7 iterations using Sigmoid1() took 3899,1979 ms
10^7 iterations using Sigmoid2() took 411,4441 ms
```
**Pure C:**
```
10^7 iterations using sigmoid1: 628 ms
10^7 iterations using sigmoid2: 157 ms
```
**F#... | [
-0.4939904510974884,
0.03779047727584839,
0.27472543716430664,
-0.06230757385492325,
-0.24536094069480896,
0.4646848142147064,
0.4973629117012024,
-0.23321768641471863,
-0.41767656803131104,
-0.19239114224910736,
-0.1797398030757904,
0.5444538593292236,
-0.0798327624797821,
-0.175698056817... | |
A **valid** JSON Syntax is something of the kind:
```
{
"username": "admin",
"password": "123"
}
```
But what if I want to transmit an array of 'users' (*given the example*), instead of a single 'user' ?
Is the code below Valid JSON, according to the specifications?
```
[{
"username": "admin",
"password": ... | [
0.2926791310310364,
0.21125003695487976,
0.3085400462150574,
-0.055942147970199585,
-0.20665982365608215,
-0.06433624774217606,
0.2259882539510727,
-0.13467423617839813,
-0.19492003321647644,
-0.5815976858139038,
-0.41301068663597107,
0.38313937187194824,
-0.30771344900131226,
-0.076104089... | |
an array.
**Edit** : [Here is a good link on JSON and its usage.](http://www.json.org/fatfree.html) | [
0.37219732999801636,
-0.33188343048095703,
-0.04375128075480461,
0.060874346643686295,
-0.3982974588871002,
-0.1563866287469864,
0.06989824771881104,
0.043444082140922546,
-0.4986482262611389,
-0.2267572283744812,
-0.4167248606681824,
0.556833028793335,
-0.638647735118866,
-0.5036507248878... | |
I admit this is not strictly a programming question, although I do use my WHS as a source repository server for home projects, and I'm guessing many other coders here do as well.
Does anyone have a recommendation for a good backup solution for the non-fileshare portion of Windows Home Server? All the WHS backups I've ... | [
0.68250972032547,
0.17845404148101807,
-0.037813156843185425,
0.19239133596420288,
0.06645441055297852,
-0.4353448152542114,
0.17483839392662048,
0.146767720580101,
-0.33537986874580383,
-0.422580361366272,
0.04653376713395119,
0.4168180227279663,
0.15720166265964508,
0.0008232961408793926... | |
Trying to find an XML file I can use in lieu of a look-up database table until we get our web hosting switched over to the right DB.
Can anyone refer me to an XML file with elements whose children have zipcodes, states, and cities? E.g.:
```
<zip code="98117">
<state>WA</state>
<city>Seattle</state>
</zip>
`... | [
0.4632130265235901,
0.3243268132209778,
0.11662456393241882,
0.4430963695049286,
0.03080914169549942,
0.09652453660964966,
0.3245319724082947,
-0.09201736003160477,
-0.21752728521823883,
-0.751266360282898,
0.006416735704988241,
-0.11873043328523636,
-0.15560249984264374,
0.109876111149787... | |
Is there any way of overriding a model's id value on create? Something like:
```
Post.create(:id => 10, :title => 'Test')
```
would be ideal, but obviously won't work.
id is just attr\_protected, which is why you can't use mass-assignment to set it. However, when setting it manually, it just works:
```
o = SomeObje... | [
0.11567077785730362,
0.14024163782596588,
0.1344827562570572,
0.07926934957504272,
-0.03863726928830147,
-0.05569928139448166,
0.24251146614551544,
-0.3221088647842407,
-0.0793616995215416,
-0.7278458476066589,
0.20454919338226318,
0.5687684416770935,
-0.45136237144470215,
0.21098622679710... | |
call, you just store your data in yml files. The foreign keys in the database reference the in-memory ids in the yml.
ActiveHash is great for picklists and small tables that change infrequently and only change by developers. So when going from ActiveHash to ActiveRecord, it's easiest to just keep all of the foreign ke... | [
0.0018234519520774484,
-0.07666146755218506,
0.36538639664649963,
0.09092607349157333,
-0.07531479001045227,
-0.2572157382965088,
-0.044710319489240646,
0.13279980421066284,
-0.1706724613904953,
-0.3971361517906189,
-0.1462213397026062,
0.6162091493606567,
-0.4405287802219391,
0.2121594101... | |
I'm using Grails 1.1 beta2. I need to import a large amount of data into my Grails application. If I repeatedly instantiate a grails domain class and then save it, the performance is unacceptably slow. Take for example importing people from a phone book:
```
for (each person in legacy phone book) {
// Construct ne... | [
0.13073959946632385,
0.2387826144695282,
-0.12594883143901825,
-0.22247925400733948,
-0.22112736105918884,
0.10474709421396255,
0.44069766998291016,
-0.21625569462776184,
-0.11183842271566391,
-0.5623279809951782,
0.13732458651065826,
0.5371108651161194,
-0.41702666878700256,
0.13156080245... | |
= new ArrayList()
for (each person in legacy phone book) {
// Construct new Grails domain class from legacy phone book person
Person person = new Person(...)
batch.add(person)
if (batch.size() > 500) {
Person.withTransaction {
for (Person p: batch)
p.save()
... | [
-0.32613605260849,
-0.3007986843585968,
0.3408757150173187,
-0.2545277178287506,
0.3077278733253479,
0.5004606246948242,
0.3686400055885315,
-0.3613610565662384,
-0.3211340308189392,
-0.4388120472431183,
-0.33739644289016724,
0.4295724630355835,
-0.060235027223825455,
0.06908203661441803,
... | |
}
}
}
// Save any remaining
for (Person p: batch)
p.save()
```
This works must faster, at least initially. Each transaction saves 500 records. As time goes on, the transactions take longer and longer. The first few transactions takes about 5 seconds, then it just creeps from there. After about 100 transaction... | [
0.06599903851747513,
0.11035335808992386,
0.17979925870895386,
-0.10921156406402588,
0.12408386915922165,
-0.06240273267030716,
0.5330124497413635,
-0.07412935048341751,
-0.30578726530075073,
-0.7058966159820557,
0.23107321560382843,
0.5237223505973816,
-0.06110386550426483,
0.012192935682... | |
like there some internal resource not being released. The performance gets worse, memory is being held on to, and then eventually the system runs out of memory.
According to the [Grails documentation](http://grails.org/doc/1.0.x/ref/Domain%20Classes/withTransaction.html), `withTransaction` passes the closure to Spring... | [
-0.5305494070053101,
-0.06354040652513504,
0.30491071939468384,
-0.15408970415592194,
-0.08388851583003998,
0.338578999042511,
0.48949259519577026,
-0.09800846874713898,
-0.5593196153640747,
-0.17166972160339355,
-0.1541314274072647,
0.21147777140140533,
-0.3316414952278137,
-0.03779447451... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.