text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
to the same queue and if not a new queue and the thread should be created. Now I want to implement the 2nd one, bit stucked. How should I do that? A skeleton would be sufficient and you won't need to worry to put how to create queues etc... :) Update : I also think that the approach 1 is the best way to do that. I re...
[ 0.39699074625968933, -0.35195550322532654, 0.3165097236633301, 0.13301704823970795, -0.2697952091693878, 0.02921169251203537, 0.2760036587715149, 0.028276612982153893, -0.5057479739189148, -0.5221297144889832, 0.17337046563625336, 0.41989201307296753, -0.5042153000831604, 0.060686014592647...
of receivers, I would not use the ONE-THREAD-AND-QUEUE-PER-RECEIVER approach. You could end up with a lot of threads not doing anything most of the time and I could hurt you performance wide. An alternative is using a thread pool of worker threads, just picking tasks from a shared queue, each task with its own receiver...
[ 0.5946488976478577, -0.10665810108184814, -0.1789165884256363, -0.04870328679680824, -0.2626378536224365, 0.022906886413693428, 0.36150220036506653, -0.2809508442878723, -0.12601076066493988, -0.8231290578842163, 0.18275398015975952, 0.473043292760849, -0.6732896566390991, 0.24095340073108...
implements Runnable { private Queue<String> myQueue = new Queue<String>(); public void run() { while (true) { string messageToProcess = null; synchronized (myQueue) { if (!myQueue.empty()) { // get your data from queue
[ 0.17458510398864746, -0.540706217288971, 0.18525685369968414, -0.05097978934645653, 0.32260406017303467, 0.21930253505706787, 0.5050114989280701, 0.3827129900455475, -0.49757394194602966, -0.21774603426456451, 0.03689269348978996, 0.48949286341667175, -0.6684101819992065, 0.284565806388855...
messageToProcess = myQueue.pop(); } } if (messageToProcess != null) { // do your stuff } Thread.sleep(500); // to avoid spinning } } public void
[ 0.28923505544662476, -0.3497776687145233, 0.31099727749824524, 0.052006907761096954, 0.5330801606178284, -0.18099138140678406, 0.36112356185913086, 0.16798652708530426, -0.5379672646522522, -0.3639153242111206, -0.27228453755378723, 0.4874013364315033, -0.21942724287509918, 0.4494912326335...
queueMessage(String message) { synchronized(myQueue) { myQueue.add(message); } } } ``` 2) On your main thread, create the messages and use a dictionary (hash table) to see if the receiver's threads is already created. If is is, the just queue the new message. If not, create a new thread, pu...
[ 0.18910321593284607, -0.3982943594455719, 0.8285679817199707, -0.1632838249206543, 0.15329688787460327, 0.17677074670791626, 0.31040921807289124, 0.12318044155836105, -0.39766407012939453, -0.6893916726112366, 0.03422250971198082, 0.3096042275428772, -0.5548331141471863, 0.4938190877437591...
// you get your rec's id from here Worker w = myHash(id); if (w == null) { // create new Worker thread w = new Worker(); new Thread(w).start(); } w.queueMessage(msg); } ``` Good luck. Edit: you can improve this solution by using [BlockingQueue](http://java.sun.com/j2se/1.5.0/docs/api/java/u...
[ 0.191411554813385, -0.3213045299053192, 0.29701435565948486, -0.1480671614408493, 0.019900232553482056, -0.153683140873909, 0.45538032054901123, -0.22770313918590546, -0.5222259163856506, -0.7056742906570435, 0.027023782953619957, 0.2533617317676544, -0.4359692335128784, 0.1616614311933517...
I have the following table: ``` CREATE TABLE `events` ( `evt_id` int(11) NOT NULL AUTO_INCREMENT, `evt_name` varchar(50) NOT NULL, `evt_description` varchar(100) DEFAULT NULL, `evt_startdate` date NOT NULL, `evt_enddate` date DEFAULT NULL, `evt_starttime` time DEFAULT NULL, `evt_endtime` time DEFAULT NU...
[ -0.2059069573879242, 0.21128037571907043, 0.6311953067779541, -0.1422516256570816, 0.18706852197647095, 0.18655329942703247, 0.13679693639278412, -0.5557392835617065, 0.2495523989200592, -0.802653968334198, -0.21451596915721893, 0.6568034887313843, -0.11305200308561325, 0.38033443689346313...
CONSTRAINT `sts_id` FOREIGN KEY (`sts_id`) REFERENCES `statusses` (`sts_id`) O N DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ``` Now I have got two problems: Here is my query: ``` INSERT INTO `events`(`evt_name` , `evt_description` , `evt_startdate` , `evt_enddate`...
[ -0.541542649269104, 0.13656456768512726, 0.5451005101203918, 0.04918890818953514, 0.081426702439785, 0.228861004114151, 0.15042448043823242, -0.3251013159751892, -0.040114182978868484, -0.501356840133667, -0.006296492647379637, 0.7623945474624634, -0.40239644050598145, -0.11512506008148193...
query in a shell directly on the mysql database I get two warnings. How can I get PHP to alert me when there are warnings because if there are warnings mysql doesn't do the insert. 2. About the warnings: | Warning | 1366 | Incorrect integer value: '' for column 'adr\_id' at row 1 | Warning | 1366 | Incorrect integer v...
[ -0.2807326912879944, 0.11955510079860687, 0.24503688514232635, -0.06923574209213257, -0.08583305776119232, -0.13481110334396362, 0.5448313355445862, -0.06616769731044769, -0.20907561480998993, -0.4822029173374176, 0.18952064216136932, 0.47733137011528015, -0.5575062036514282, 0.27344655990...
number in that field As you said, the column does not have to have a value specified when you insert. The fact is indicated by the "DEFAULT NULL" for that column at table creation. This fact, however, means that if you *do* *not* specify the column name in your list of columns while doing INSERT (and therefore you wil...
[ -0.117754265666008, 0.03297704830765724, 0.4676349461078644, -0.16710129380226135, -0.013123715296387672, 0.11086294054985046, 0.1719316840171814, 0.09005735069513321, -0.3272911608219147, -0.28649091720581055, -0.33350855112075806, 0.3129430115222931, -0.5139227509498596, 0.35160472989082...
column value you say is '' (an empty string). This is of course not valid, because that column accepts integers (or NULL, because you havent' declared the column NOT NULL), and an empty string is an empty string, not an integer. The SQL server is generous and accepts the empty string anyway (probably it casts it to ze...
[ 0.057891394942998886, 0.21053574979305267, 0.47704562544822693, 0.008617795072495937, 0.16978496313095093, -0.2988308072090149, 0.4116460680961609, 0.17337416112422943, -0.12057822942733765, -0.2798948884010315, 0.014963442459702492, 0.6730588674545288, -0.44803500175476074, 0.094891563057...
is server wide, involving all your databases and all your tables (at least with the mysql released one year ago). If you have awfully written software that need a forgiving server, then you cannot use it.
[ 0.03154214844107628, -0.018461361527442932, 0.4070464074611664, 0.09713390469551086, 0.1107945665717125, -0.42008042335510254, -0.13298071920871735, 0.4513866603374481, -0.37604570388793945, -0.5077090263366699, 0.05749619007110596, 0.09862800687551498, -0.04997082054615021, -0.00109654432...
I have a main page into which i load a user control with a grid and add/edit link buttons. If I bind the grid by setting the datasource and calling the databind() method in the page load event then it sets properly. However, I want to keep the selected row between postbacks, so I wrap the bind code in "if (!Page.IsPos...
[ -0.21571949124336243, 0.09012934565544128, 0.5863730907440186, -0.1340678334236145, -0.2633993923664093, -0.033496469259262085, 0.24097348749637604, -0.3135960102081299, 0.12855246663093567, -0.8161299228668213, 0.08564130961894989, 0.36252519488334656, -0.48349738121032715, 0.357124119997...
something simple.... or hoping anyway! Thanks in advance The two ways I found round this were: 1. to load the user controls when the page is first loaded and then hide them until user selected what they need to see. 2. to load a new page into an iframe on the main page allowing it to have its own page control meaning...
[ 0.3202037513256073, -0.3384138345718384, 0.1366245597600937, 0.4580925703048706, -0.333467036485672, -0.06129821017384529, 0.3597199320793152, -0.04818917065858841, -0.06510457396507263, -0.4093936085700989, 0.3325939178466797, 0.49352142214775085, -0.06704862415790558, -0.3658703863620758...
I want to parse a file everytime a new file is created in a certain directory. For this, I'm trying to use [pyinotify](http://pyinotify.sourceforge.net/) to setup a directory to watch for `IN_CREATE` kernel events, and fire the `parse()` method. Here is the module: ``` from pyinotify import WatchManager, Threaded...
[ 0.5213441252708435, 0.06315430998802185, 0.19558173418045044, -0.16624194383621216, 0.25454315543174744, -0.027300676330924034, 0.21986135840415955, -0.2916924059391022, -0.163175567984581, -0.774000346660614, 0.00433082552626729, 0.6888601183891296, -0.6836168169975281, 0.0023956305813044...
wm.add_watch(self.watchdir, IN_CREATE) self.notifier.start() def process_IN_CREATE(self, event): pfile = self._parse(event.pathname) print(pfile) def _parse(self, filename): f = open(filename) file = [line.strip() for line in f.readlines()] f.close() ret...
[ 0.23673506081104279, -0.25484293699264526, 0.5617385506629944, -0.49577730894088745, 0.18061776459217072, 0.07202117145061493, 0.26638758182525635, -0.4529865086078644, -0.3651719391345978, -0.5875598192214966, -0.41062378883361816, 0.7534560561180115, -0.4931271970272064, 0.12410185486078...
by a new file creation event, like so (the file is created in another window while `watcher.py` is running): ``` $ python watcher.py [] ``` ...but strangely enough, it works from an interpreter session when called directly. ``` >>> import watcher >>> w = watcher.Watcher() >>> w._parse('/tmp/watch/sample') ['This is...
[ 0.5893514752388, -0.04157335311174393, 0.21968431770801544, -0.16525103151798248, 0.09122318774461746, -0.17635421454906464, 0.4441293179988861, 0.05171944573521614, -0.3907569646835327, -0.562112033367157, -0.2083933800458908, 0.4269154667854309, -0.5779215693473816, 0.21973581612110138, ...
I've been trying to make an AJAX request to an external server. I've learned so far that I need to use getJSON to do this because of security reasons ? Now, I can't seem to make a simple call to an external page. I've tried to simplify it down as much as I can but it's still not working. I have 2 files, test.html & te...
[ 0.48019832372665405, 0.2864837050437927, 0.16311582922935486, -0.22772260010242462, -0.14595340192317963, -0.018851153552532196, 0.6418382525444031, -0.21766255795955658, -0.019349006935954094, -0.6976019740104675, 0.09529197216033936, 0.3608255088329315, -0.28117820620536804, 0.0821662098...
making some incredible rookie mistake but I can't seem to figure it out. Also, if this works, how can I send data to my test.php page, like you would do like test.php?id=15 ? --- The test.html page is calling the test.php page on localhost, same directory I don't get any errors, just no alert .. It *could* be that yo...
[ 0.36730948090553284, -0.05330060422420502, 0.13494005799293518, -0.024642474949359894, -0.2769884765148163, -0.06658522039651871, 0.5520226359367371, -0.3906141519546509, 0.03441054746508598, -0.3968328833580017, -0.07836157083511353, 0.4576285183429718, -0.14433501660823822, 0.02206953242...
of `XMLHttpRequest`) when you use `http://`. If you have test.html and test.php on the same domain, try using relative paths (and no callbacks).
[ 0.3900548815727234, -0.18947356939315796, 0.15954731404781342, 0.10223808139562607, -0.25998127460479736, -0.35914191603660583, 0.21243061125278473, -0.04539957270026207, -0.11252973973751068, -0.7762619853019714, -0.21680186688899994, 0.24570445716381073, -0.2091044783592224, -0.087063156...
I am creating a report in LaTeX which involves a few tables. I'm stuck on that as my cell data in the table is exceeding the width of the page. Can I somehow wrap the text so that it falls into the next line in the same cell of the table? Is it somehow related to the table's width? But as it's overshooting the page's ...
[ 0.09011475741863251, 0.27997252345085144, 0.6117636561393738, 0.05632736161351204, -0.1647554337978363, 0.08276287466287613, 0.09408889710903168, -0.32015669345855713, -0.3134188950061798, -0.5121652483940125, -0.041353557258844376, 0.10114133358001709, -0.4394381046295166, -0.022273646667...
\begin{tabular}{p{0.35\linewidth} | p{0.6\linewidth}} Column 1 & Column2 \\ \hline This text will be wrapped & Some more text \\ Some text here & This text maybe wrapped here if its tooooo long \\ \end{tabular} \caption{Caption} \label{tab:my_label} \end{table} ``` we get: [![enter ima...
[ 0.08361213654279709, -0.06849097460508347, 0.8585708737373352, 0.11426348239183426, -0.18558169901371002, 0.09754633903503418, 0.16478575766086578, -0.194917231798172, -0.3848876953125, -0.4480430781841278, -0.2962619364261627, 0.23382394015789032, -0.2148880809545517, -0.06557898223400116...
Hi I'm looking for the cheapest hosting that would allow me to deploy a number of rails and non-rails apps along with maybe a blog and other goodies. Traffic is likely to be rather low, but still important. Like a portfolio site. What are good hosting providers for that? Go with Slicehost (or another VPS). Since you...
[ 0.21511957049369812, 0.00030732768937014043, 0.5651811361312866, 0.3428563177585602, -0.40431222319602966, -0.04797592759132385, -0.039843373000621796, 0.19626319408416748, -0.244418665766716, -0.43434423208236694, 0.016917910426855087, 0.2979101240634918, 0.15310630202293396, 0.0888799279...
it. It's been rock solid for me so far. You can get a functional 256MB slice for $20usd a month. Heroku is a managed solution (they do a lot of the work for you and I haven't worked out the price differences since they only just went commercial but they should be a bit more expensive than slicehost - but I am only g...
[ 0.27579960227012634, -0.3652881383895874, 0.5906332731246948, 0.2834590673446655, -0.07889272272586823, -0.3272263705730438, 0.05309214070439339, 0.19487398862838745, -0.15958906710147858, -0.8331218957901001, -0.13408873975276947, 0.5854612588882446, 0.3443116843700409, 0.1606263071298599...
and mongrel, nginx, passenger while you learn rails. Maybe also throw in SMTP, Starling & Workling and monit/god.
[ 0.4247779846191406, -0.2583955228328705, -0.31307825446128845, 0.3503727614879608, -0.4240455627441406, 0.4577125012874603, 0.38846489787101746, 0.7241525650024414, -0.24971485137939453, -0.5662135481834412, -0.028173239901661873, 0.7419023513793945, -0.18083412945270538, -0.03130402415990...
I have another MySQL problem. Again, with the complex queries I'm in over my head. On my website I *currently* display the last 5 reviewed games on the main page. Now, it's been ticking over a while and I've decided to add news items as well to the same page. But, I want to *change* the system that I have into one th...
[ 0.14691610634326935, 0.24309271574020386, 0.34464311599731445, 0.035343464463949203, -0.09278549998998642, -0.11504250764846802, 0.11478521674871445, 0.2677456736564636, -0.4231191873550415, -0.880644679069519, 0.10004755854606628, 0.6041926741600037, 0.1518799513578415, 0.4536190629005432...
connected to the **review** table with gameID, but neither of these tables are associated with the **news** table. The current query is this: ``` SELECT news.newsTitle, news.newsBody, DATE_FORMAT( review.postedOn, '%M %d, %Y' ) AS reviewPosted, DATE_FORMAT( news.postedOn, '%M %d, %Y' ) AS newsPosted, game.gameID, g...
[ 0.08928920328617096, 0.20671433210372925, 0.2157091647386551, 0.08357609808444977, 0.07662982493638992, 0.0010307279881089926, 0.1258164346218109, -0.00872256699949503, -0.16178321838378906, -0.8076417446136475, -0.24846413731575012, 0.5160506963729858, 0.10112529247999191, 0.5190951228141...
output the same number of (and equivalent) columns, join the results using UNION then order by date and limit results to the top 5. Using the above, you could return the newest top 5, regardless of their mix between news / reviews - is that what you mean? The following should return the desired data: ``` (SELECT ne...
[ 0.23012378811836243, 0.03412015736103058, 0.6551194787025452, 0.13457004725933075, -0.0023925299756228924, 0.24113918840885162, -0.13200563192367554, -0.3104195296764374, -0.16382822394371033, -0.6225181221961975, -0.2768089473247528, 0.3693562150001526, 0.16282185912132263, 0.241846472024...
review ON game.gameID = review.gameID WHERE game.isPublished = 'y') ORDER BY postedOn DESC LIMIT 0,5 ```
[ 0.06748909503221512, 0.23913885653018951, 0.22032654285430908, 0.27576595544815063, 0.11579622328281403, -0.2977222502231598, 0.28970131278038025, 0.09516016393899918, -0.14654448628425598, -0.7901008129119873, -0.3181876540184021, 0.737891674041748, -0.010996075347065926, 0.37260252237319...
I need to set up a MySQL environment that will support adding many unique databases over time (thousands, actually). I assume that at some point I will need to start adding MySQL servers, and would like my environment to be prepared for the case beforehand, to make the transition to a 2nd, 3rd, 100th server easy. And...
[ 0.12694604694843292, 0.26422008872032166, 0.5247679352760315, 0.3822084665298462, 0.04671484977006912, -0.049524690955877304, 0.03398146107792854, 0.09729284793138504, -0.46836772561073303, -0.7486794590950012, 0.12160062789916992, 0.13706094026565552, -0.10335472971200943, 0.2359479963779...
the servers. The database name is unique and can be used to figure out which server holds the database. I've done some research, and MySQL Proxy pops out as the main candidate, but I haven't been able to find anything specific about making it perform as described above. Anyone? Great question. I know of several comp...
[ 0.541590690612793, 0.11114609241485596, 0.25738972425460815, 0.49119338393211365, 0.003045606892555952, 0.02082505077123642, 0.1555129736661911, 0.4542047679424286, -0.47198423743247986, -0.4228876531124115, 0.0756555050611496, 0.2126835584640503, -0.2093762457370758, 0.13526225090026855, ...
(and you will, even if you don't think so right now). Here's the FriendFeed solution: <http://bret.appspot.com/entry/how-friendfeed-uses-mysql> It's a bit "back-asswards" since they are basically using MySQL as a glorified key-value store. I am not sure why they don't just cut out the middleman and use something like...
[ 0.29184940457344055, 0.21578726172447205, 0.1860407143831253, 0.3263087570667267, 0.29527395963668823, -0.21653473377227783, 0.1186467632651329, 0.4339754283428192, -0.251823365688324, -0.5977615714073181, 0.1540554016828537, 0.5125280022621155, 0.098239965736866, 0.13480140268802643, -0...
and PostgreSQL, but none are available for free. If you are in the buying mood, check out these companies: [Greenplum](http://www.greenplum.com), [AsterData](http://www.asterdata.com), [Netezza](http://www.netezza.com), [Vertica](http://www.vertica.com). There is also a large number of various distributed key-value st...
[ 0.47759243845939636, -0.06577303260564804, -0.056624460965394974, 0.26452308893203735, 0.027617115527391434, -0.07518648356199265, 0.1278780698776245, 0.43431925773620605, -0.42345377802848816, -0.44854670763015747, -0.2780536711215973, 0.1397986114025116, -0.15695303678512573, 0.100808352...
For example, is there a way to find out that this class has a virtual constructor (at runtime)? ``` TMyClass = class(TObject) MyStrings: TStrings; constructor Create; virtual; end; ``` For example, in this code I would like to test if the class referenced by Clazz has a virtual constructor: ``` p...
[ -0.08749275654554367, -0.22176022827625275, 0.5054313540458679, 0.0394793301820755, 0.23897291719913483, -0.13785164058208466, 0.38092002272605896, -0.06183779984712601, -0.24163058400154114, -0.5950268507003784, -0.05476714298129082, 0.6554927825927734, -0.4433152973651886, 0.188663035631...
any way to tell if a method is virtual using RTTI or not. If you have a class reference, though, you can probably roll your own method by examining the VMT. According to Allen Bauer, in an answer to [this question](https://stackoverflow.com/questions/760513/where-can-i-find-information-on-the-structure-of-the-delphi-v...
[ -0.01947053335607052, -0.2543027102947235, 0.324230432510376, 0.19729351997375488, 0.00888888631016016, -0.21653731167316437, 0.033461712300777435, -0.11312790215015411, -0.3299519717693329, -0.5168700814247131, -0.15576499700546265, 0.509364128112793, -0.20324333012104034, 0.0052529810927...
while loop that compares each pointer in the table against the Code section of a method pointer to Clazz.create casted to a TMethod. If you get a match, then it's a virtual method. If not, then it isn't. Yes, it's a bit of a hack, but it'll work. If anyone can find a better solution, more power to them.
[ 0.6719462275505066, -0.3446744680404663, 0.11191413551568985, 0.5329352021217346, -0.14591717720031738, -0.0247243233025074, 0.14243455231189728, -0.012375354766845703, -0.137113556265831, -0.6716950535774231, 0.31270527839660645, 0.40627118945121765, -0.2292250692844391, 0.290130347013473...
Such a decent question,how do I add images(I googled,but they say I have to add approximately 50 lines of code to do that,why?)? If you auto-generate the documentation, why put it in the repository at all? You create it every time, so there's no point in having it versioned too (it's generated after all). I'd rather us...
[ 0.8857053518295288, 0.29418981075286865, 0.01480316836386919, 0.47735026478767395, 0.14352011680603027, 0.09453705698251724, -0.01891458034515381, -0.2779098153114319, -0.3205898404121399, -0.5716331005096436, 0.11970214545726776, 0.4801362156867981, -0.08250676095485687, -0.15987178683280...
pre-commit hooks should not modify what's being committed :)
[ 0.37994179129600525, -0.35116204619407654, 0.015565037727355957, -0.13206562399864197, 0.2829556167125702, -0.12111897021532059, 0.2407393753528595, -0.23834000527858734, -0.10510718822479248, -0.3285418748855591, -0.29144537448883057, 0.6611136794090271, -0.363540381193161, -0.30335262417...
I have an instance of a UITableView, and a separate class that adheres to the delegate and datasource protocols. I'm doing this like so: ``` SubjectTableViewHandler *handler = [[[SubjectTableViewHandler alloc] init] retain]; tv.delegate = handler; tv.dataSource = handler; [handler autorelease]; ``` I don't want to m...
[ 0.16676339507102966, 0.020562732592225075, 0.7024007439613342, -0.14722886681556702, 0.09745106846094131, -0.16825619339942932, 0.09817572683095932, -0.3804018795490265, -0.16331709921360016, -0.5030288100242615, -0.05590880662202835, 0.6403331160545349, -0.07930533587932587, 0.31724414229...
properties are 'assign', they will never be released, the retain count will never hit 0, and the handler will never be deallocated anyway. Is there any more efficient way to accomplish this than maintaining the handler as an ivar and releasing it in the `dealloc` method? When you initialize the object using init, you a...
[ -0.08736566454172134, -0.13051417469978333, 0.5274490118026733, 0.0961209312081337, 0.23110298812389374, -0.3672221601009369, -0.10792550444602966, -0.3769901692867279, -0.16432024538516998, -0.3507445156574249, -0.18793387711048126, 0.617820680141449, -0.14791205525398254, 0.3352723419666...
the delegate/dataSource methods) and a reference to the handler after the method returns (so you can release it when you are done showing the tableView), the cleanest approach would be to make it an ivar.
[ 0.16436345875263214, -0.3272291421890259, 0.4008744955062866, 0.22125281393527985, -0.08980594575405121, -0.21922121942043304, -0.09750714153051376, -0.4246714115142822, -0.21670962870121002, -0.483767032623291, -0.15582868456840515, 0.314164936542511, -0.20712700486183167, 0.1902563124895...
How can I create an instance of an object using a class reference, and ensure that the constructor is executed? In this code example, the constructor of TMyClass will not be called: ``` type TMyClass = class(TObject) MyStrings: TStrings; constructor Create; virtual; end; constructor TMyClass.Create;...
[ 0.03901838883757591, -0.03562897443771362, 0.24537290632724762, -0.04826229438185692, 0.16616502404212952, -0.10430646687746048, 0.5269774794578552, -0.34161460399627686, -0.05618419498205185, -0.5817573666572571, -0.20573095977306366, 0.5233076810836792, -0.3855374753475189, 0.34211808443...
TMyClass; // <- add this definition constructor TMyClass.Create; begin MyStrings := TStringList.Create; end; procedure Test; var Clazz: TMyClassClass; // <- change TClass to TMyClassClass Instance: TObject; begin Clazz := TMyClass; // <- you can use TMyClass or any of its child classes. Instance := Claz...
[ 0.07000453025102615, -0.4597931504249573, 0.29574552178382874, 0.0791715756058693, 0.2540932297706604, 0.15953344106674194, 0.31982284784317017, -0.12304072082042694, -0.11787784099578857, -0.6411794424057007, -0.25682833790779114, 0.5701780319213867, -0.3524720072746277, 0.293534368276596...
Can I use upx packer to compress a commercial program? Or does GPL restrict me from doing that? Yes, you can. Please have a look at the [UPX license](http://upx.sourceforge.net/upx-license.html). There's a special exception for commercial applications so they can use UPX. Note to Zifre: UPX is GPL, but it's not the sa...
[ 0.4947477877140045, 0.29257869720458984, 0.5081560611724854, 0.05607825145125389, -0.06447798013687134, -0.28967857360839844, -0.037498507648706436, -0.1825183928012848, -0.42890095710754395, -0.6118972897529602, -0.08056782931089401, 0.7322624921798706, -0.48240119218826294, 0.16695033013...
I have lots of directories filled with a bunch of TeX documents. So, there's lots of files with the same base filename and different extensions. Only one of them, though, is editable. I'd like a way to convince Emacs that if I'm in a directory where I've got ``` document.tex document.log document.pdf document.bbl docu...
[ 0.4444563090801239, 0.3884788155555725, 0.6144981980323792, 0.05311522260308266, 0.5295134782791138, -0.0352545864880085, -0.00003643025775090791, 0.009339707903563976, -0.30908167362213135, -0.505479633808136, -0.08125185966491699, 0.7595979571342468, -0.038401395082473755, 0.314939260482...
want to skip, but only when there are `.tex` files present. This code does that. ``` (defadvice find-file-read-args (around find-file-read-args-limit-choices activate) "set some stuff up for controlling extensions when tab completing" (let ((completion-ignored-extensions completion-ignored-extensions) (fin...
[ 0.25718510150909424, -0.09909496456384659, 0.49484485387802124, -0.07942773401737213, 0.5094078779220581, -0.3181202709674835, 0.22278930246829987, -0.34089669585227966, -0.6441707611083984, -0.1988966166973114, -0.3528437316417694, 0.552943766117096, -0.5698917508125305, -0.26028889417648...
(let ((b (progn (beginning-of-line) (point))) (e (progn (end-of-line) (point)))) (directory-files (file-name-directory (buffer-substring-no-properties b e)) nil "\\.tex$")))) 'add-to-list 'remove))) (mapc (lambda (e) (setq completion-ignored-extensions (funcall add-or-rem...
[ 0.4631580114364624, -0.11402006447315216, 0.9416363835334778, -0.06350186467170715, 0.2899627685546875, -0.518393874168396, 0.29099634289741516, -0.44826018810272217, 0.004565075039863586, -0.540157675743103, -0.6748910546302795, 0.9821383953094482, -0.2510605454444885, -0.2622311413288116...
Google announced the [Analytics Data Export API](http://googledataapis.blogspot.com/2009/04/google-analytics-data-export-api-has.html) some days ago, thereby making it much easier to get analytics data for a site. The API debuted with Java and Javascript clients, but no direct .Net support (other than going straight fo...
[ 0.16417597234249115, -0.07480409741401672, 0.6001739501953125, 0.06548953056335449, -0.6574375629425049, -0.09929745644330978, -0.13705487549304962, 0.08880544453859329, -0.044320717453956604, -0.20908348262310028, 0.06364649534225464, 0.4135998487472534, -0.47610464692115784, -0.010932926...
that (since Google is probably better at weeding out spurious requests, robots, etc.). If you have any thoughts on that idea, I'd much appreciate hearing them too. Check the [trunk](http://code.google.com/p/google-gdata/source/browse/) of Google's .NET library, they have added Analytics support. Also check their group...
[ 0.3985697329044342, 0.17743906378746033, 0.13558143377304077, 0.4223288893699646, 0.04055891931056976, -0.15489795804023743, 0.07811284810304642, 0.1575152724981308, -0.2948463261127472, -0.47670653462409973, 0.014866516925394535, 0.4427957236766815, 0.14110080897808075, 0.0556277483701705...
When I am in my dept's server, I cannot use commands such as "apt-get install nethack". I have to build the nethack from Binary files to get it working, at least so I have been told. I cannot understand the reason. Why do I need to build things from binaries? Why is the use of the commands, such as "apt-get", forbidden...
[ 0.4675010144710541, 0.024005882441997528, 0.06096653640270233, -0.08995586633682251, 0.08275225758552551, -0.06037059798836708, 0.4825133979320526, -0.011157352477312088, 0.03973352164030075, -0.8813567161560059, -0.15903617441654205, 0.6033308506011963, -0.14249303936958313, 0.29420244693...
up in '~/bin', man pages in '~/man' etc). This poses no problems because you already have permission to write here. Apt-get on the other hand installs the packages in the global filesystem ('/bin/', '/usr/bin/', etc), which can impact other users and so, quite rightly, require administrative access. If you want to in...
[ 0.30266073346138, 0.11219745129346848, 0.5534022450447083, 0.10382161289453506, 0.04680261388421059, -0.196857288479805, 0.1173362135887146, -0.38788560032844543, -0.2424086481332779, -0.934421718120575, -0.4648664891719818, 0.6718530654907227, -0.2575959861278534, 0.06524255871772766, -...
to get it work, since you download the version that should work on your system. Alternatively you should bug your sysadmin to install the programs you need, since it is his job (and if you need them, chances are that the rest of your team does too).
[ 0.7889860272407532, 0.04421723634004593, 0.261669397354126, 0.34421542286872864, 0.41951146721839905, -0.42265889048576355, 0.3208560645580292, 0.0819796696305275, -0.2693779468536377, -0.3611829876899719, -0.3893126845359802, 0.4813043177127838, -0.12641768157482147, -0.23353475332260132,...
Just finished reading Crockford's "**[JavaScript: The Good Parts](http://oreilly.com/catalog/9780596517748/)**" and I have a question concerning his stance on the psuedo-classical vs. prototypal approaches. Actually I'm not really interested in his stance; I just want to understand his argument so I can establish a sta...
[ 0.4016472101211548, 0.48468923568725586, -0.24686716496944427, -0.4351126551628113, -0.2915990948677063, -0.06164146959781647, 0.1492236703634262, -0.2917276918888092, 0.03381112590432167, -0.3822944164276123, -0.1847037971019745, 0.5834039449691772, -0.25286349654197693, -0.00222530472092...
guess I don't. When I need to create a new module I would normally start of like this: ``` function MyModule(something) { this.something = something || {}; } ``` And then I would add some methods to its prototype: ``` MyModule.prototype = { setSomething : function(){}, getSomething : function(){}, ...
[ 0.12767963111400604, 0.007659334223717451, 0.1964208036661148, -0.16740895807743073, 0.09365247189998627, 0.16965816915035248, 0.17558720707893372, -0.21975095570087433, -0.07786359637975693, -0.7712196111679077, 0.06738350540399551, 0.4295811057090759, -0.31593024730682373, 0.046801630407...
available to this instance. ``` **My question is**: How do I achieve the above using an approach more suited to JavaScript? In other words, if "JavaScript" were a person, what would she suggest? Also: What does Crockford mean when he says a particular design pattern "is more expressive" then another? ### See: [Is Ja...
[ 0.232808917760849, 0.41674965620040894, -0.01722339168190956, -0.1641562134027481, -0.29117175936698914, -0.06847085058689117, 0.3301422595977783, -0.41309261322021484, -0.24311867356300354, -0.5470706820487976, -0.05718914791941643, 0.5639402866363525, -0.08215593546628952, 0.111924603581...
they started to realize that it wasn't really necessary; if you approach JS on its own terms, you can get along just fine.
[ 0.613914966583252, -0.03644629195332527, 0.22607268393039703, -0.08026674389839172, -0.23640891909599304, -0.011392335407435894, 0.30377256870269775, 0.49484825134277344, -0.006649792194366455, -0.37908491492271423, 0.12914976477622986, 0.28438690304756165, 0.31861385703086853, 0.006883571...
I am having a heck of time with something that seems rather straightforward but I can't seem to get working. I am building an iPhone app that retrieves data from a web host. I am trying to establish an asynchronous connection to the host as I want to keep the device freed up during the connection. (sendSync...
[ 0.01086018979549408, 0.05593881383538246, 0.6007201075553894, -0.02591286227107048, 0.07441702485084534, -0.0059999143704771996, 0.48380541801452637, -0.0763913244009018, -0.24849697947502136, -0.5132527351379395, -0.09028572589159012, 0.33467593789100647, -0.18945923447608948, 0.066718108...
cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60]; /* establish the connection */ theConnection = [[NSURLConnection alloc] initWithRequest:dataRequest delegate:self startImmediately:YES]; if (theConnection == nil) { NS...
[ -0.549444854259491, -0.1494520604610443, 0.36955633759498596, 0.09864748269319534, 0.3069583475589752, 0.05109923332929611, 0.6100643277168274, -0.20394422113895416, -0.19933748245239258, -0.6234444975852966, -0.18967047333717346, 0.40921229124069214, -0.052709173411130905, 0.4410755932331...
{ self.urlData = [[NSMutableData data] retain]; } ``` I have all of the appropriate delegate methods set up: ``` -(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse*)response { [urlData setLength:0]; UIApplication *application = [UIApplication sharedApplication]; ...
[ -0.3087354898452759, -0.25404632091522217, 0.7938650846481323, -0.04402764514088631, -0.17718277871608734, 0.19816291332244873, 0.579965353012085, -0.5233557224273682, -0.2722926437854767, -0.7350801229476929, -0.31369951367378235, 0.7741160988807678, 0.1003502681851387, 0.2061295062303543...
%d", self.urlDataSize); NSLog(@"float filesize: %f", [self.urlDataSize floatValue]); } ``` ``` -(void)connectionDidFinishLoading:(NSURLConnection*)connection { NSLog(@"Connection finished loading\n"); NSLog(@"Succeeded! Received %d bytes of data",[urlData length]); _isFinished = YES; UIApplication...
[ -0.10201729089021683, -0.14107736945152283, 0.7446138262748718, -0.0887250229716301, 0.04307977855205536, -0.0076569681987166405, 0.6790320873260498, -0.09011899679899216, -0.43816593289375305, -0.764285683631897, -0.21061639487743378, 0.6308453679084778, -0.10485289245843887, 0.3516399860...
Like I said, I'm sure I must be doing (or not doing) something *really* stupid. But what? Any help would be most appreciated. Thanks, Lawrence This doesn't answer your question directly, but you might consider looking into Ben Copsey's [`ASIHTTPRequest`](http://allseeing-i.com/ASIHTTPRequest-CFNetwork-wrapper-fo...
[ 0.6514493227005005, 0.19940488040447235, -0.228497713804245, 0.29867303371429443, 0.031618934124708176, -0.36667898297309875, 0.4415194094181061, 0.0828205943107605, -0.17609907686710358, -0.20808249711990356, 0.15720148384571075, 0.4237598776817322, -0.07166527956724167, -0.02436691150069...
Apologies in advance for the possible flame thread, but that's not what I'm going for. I've only ever done serious development in Linux using C and C++, and I'm looking to take the plunge into Windows. I've been doing some reading and asking around, and it seems to me that .NET with C# is the way to go for developing ...
[ 0.19783915579319, 0.13157495856285095, 0.21813170611858368, -0.011684096418321133, 0.03715500235557556, -0.228328675031662, 0.05368500575423241, 0.12941531836986542, -0.09446791559457779, -0.6358979344367981, 0.017568130046129227, 0.7531782984733582, 0.08738555759191513, 0.0081226192414760...
in Java, for example, or is this only possible with .NET? I'm also concerned about portability. In the future, I may want to port the application to Linux. I know about the mono project, but I'm wondering if it wouldn't be better to go with Java. In short, what are the trade offs between Java and C# when developing c...
[ 0.6100695729255676, 0.023503627628087997, -0.17436301708221436, 0.10350676625967026, -0.15655674040317535, -0.14461717009544373, 0.020542282611131668, 0.30749011039733887, -0.4390612244606018, -0.7001945972442627, 0.09200877696275711, 0.8666220307350159, -0.20234017074108124, -0.1291235089...
blend in well with Windows. It also makes interoperating with native code (e.g. bits of the Win32 API or COM libraries) easier than Java. Personally I prefer it as a language, but that's a different matter. If you need to run on other platforms, I'd seriously consider Java. While [Mono](http://mono-project.com) has qu...
[ 0.5985109806060791, -0.12269023805856705, 0.041749194264411926, -0.25270724296569824, 0.1640855222940445, -0.12328772246837616, 0.19122883677482605, 0.22598226368427277, -0.23029488325119019, -0.8135791420936584, 0.024665137752890587, 0.832289457321167, -0.4262820780277252, 0.0122457360848...
decided to do a port, it doesn't matter much if 90% of your customers are on Windows - it'll still need to work, and work well, for the remaining 10%.
[ 0.4618486762046814, 0.057066045701503754, 0.7058643698692322, 0.15114976465702057, 0.2883383631706238, 0.08385313302278519, 0.16651396453380585, 0.2732163965702057, -0.1339530199766159, -0.4838746190071106, 0.08393717557191849, 0.5671375393867493, 0.14270538091659546, 0.0016652565682306886...
I have been doing some refactoring and reorganization and I have moved a bunch of files around. I want to update each file so it has the "correct" namespace according to its new location. With ReSharper, I can go into each file and it shows me that the namespaces is incorrect but that way I have to do it each file at ...
[ 0.377398818731308, 0.2333093136548996, 0.6522786021232605, 0.10597646981477737, 0.20231662690639496, -0.15378405153751373, -0.0018661590293049812, -0.32831522822380066, -0.04544138163328171, -0.7571709156036377, -0.0337924063205719, 0.5398198962211609, -0.23938752710819244, -0.121202185750...
Very much a noob here, so it's best to assume I know nothing in any answers. I've been writing a little app, and it's working well, but readability is a nightmare with my numbers. Essentially, all I want to do is to add commas into the numbers displayed on the screen to make it easier to read. Is there a quick and ea...
[ 0.2653639316558838, 0.27875083684921265, 0.28868886828422546, -0.012551055289804935, 0.031047949567437172, 0.10683947801589966, 0.34855881333351135, 0.11398502439260483, -0.251808762550354, -0.4895608425140381, -0.06832491606473923, 0.2372215837240219, -0.06191987544298172, -0.287803828716...
<string> #include <sstream> using namespace std; int items; string stringcheck; ... cout << "Enter how many items you have: "; getline (cin, stringcheck); stringstream(stringcheck) >> items; ... cout << "\nYou have " << items << " items.\n"; ``` When that number is typed as something larg...
[ 0.026372600346803665, 0.12223747372627258, 0.3039996027946472, -0.12350186705589294, 0.11627809703350067, 0.19480665028095245, 0.20257554948329926, -0.16565662622451782, -0.5121467709541321, -0.6078349947929382, -0.3128049075603485, 0.19833441078662872, -0.1998109668493271, 0.1419086903333...
this as a console application in Microsoft Visual C++ 2008 Express Edition. Try the [`numpunct`](http://en.cppreference.com/w/cpp/locale/numpunct) facet and overload the [`do_thousands_sep`](http://en.cppreference.com/w/cpp/locale/numpunct/thousands_sep) function. There is an [example](http://en.cppreference.com/w/cpp/...
[ -0.5307585597038269, 0.0637737438082695, 0.6445215344429016, -0.06949108093976974, -0.19231049716472626, 0.21659907698631287, 0.38920971751213074, 0.042035698890686035, -0.3763090670108795, -0.6961894035339355, -0.014727914705872536, 0.5484089851379395, -0.34097930788993835, -0.03168714419...
I have a table in a sql server 2008 database that contains bunch of records as well as a date column. The date is inserted automatically when a new entry to the table occurs. So, it contains the date of the record that has been created. I am trying to run a query that would return me the earliest date and the latest d...
[ 0.10662717372179031, 0.2108333706855774, 0.48563602566719055, 0.20534612238407135, 0.23098145425319672, -0.08910318464040756, -0.4287441074848175, 0.1550590991973877, -0.27368953824043274, -0.5441220998764038, 0.14535444974899292, 0.031105319038033485, 0.09185240417718887, 0.53212696313858...
News ORDER BY DateAdded ASC; ``` but it only returned the 'firstdate'. Can anyone guide me on how to achieve this? ``` SELECT MIN(DateAdded) As FirstDate, MAX(DateAdded) As LastDate FROM News; ```
[ -0.002146841026842594, -0.2582777142524719, 0.5599250793457031, 0.0044390116818249226, -0.031113769859075546, 0.2929967939853668, -0.13637599349021912, 0.23767830431461334, -0.05258071795105934, -0.5661066770553589, -0.3861164450645447, 0.1992569863796234, 0.19926685094833374, 0.3543034791...
I use a template for my website and I fill its cells with an Image control and set that with the URl of picture, but when I upload my website I can't see that Picture. I Created a new folder for all Images and use Master page for this website. LINK : <http://www.aalaa.ir/az/> Cycles aren't bad, but they are often avo...
[ 0.7680160999298096, 0.25127744674682617, 0.06465693563222885, 0.18495501577854156, 0.04290757700800896, 0.12225276976823807, 0.5410319566726685, -0.0030553133692592382, -0.5646459460258484, -0.3495255410671234, 0.2676655054092407, 0.4952898323535919, -0.19927185773849487, 0.155247732996940...
Every time a reference is deleted, the count goes down, when the count gets to zero, there are no references and so the object can be deleted. This usually takes care of itself and works ok without any careful thinking. If you've got a group of objects with no cycles and you drop your reference to the root object, the...
[ 0.2831082046031952, -0.0150405652821064, 0.48618394136428833, 0.41833484172821045, 0.04681750386953354, -0.24510976672172546, 0.4395361840724945, -0.10361456871032715, -0.7615736126899719, -0.33933866024017334, -0.10144250094890594, 0.2538251578807831, -0.47763049602508545, 0.4446618556976...
if you have a cycle, this cascade doesn't work. You may have a group of objects and you don't want them any more, so you drop the only reference you have to these objects, but because there is a cycle the objects reference each other. This means their reference counts never go to zero, and they don't get deleted. This ...
[ 0.36576956510543823, 0.03197864443063736, 0.29170340299606323, 0.45169898867607117, 0.10425666719675064, -0.14920423924922943, 0.27265694737434387, -0.02727808617055416, -0.7181722521781921, -0.22391292452812195, -0.03322138264775276, 0.35705244541168213, -0.564759373664856, 0.330900013446...
very easy to get wrong. This is one of the main reasons that memory leaks occur. To avoid the risk of leaks and the tricky job of breaking cycles correctly when you no longer need a group of objects, programmers usually try to avoid cycles. This becomes more important on big projects with many programmers where no one...
[ 0.15578965842723846, 0.08266409486532211, -0.2686532735824585, 0.4721287488937378, -0.027116836979985237, -0.37925395369529724, 0.6623562574386597, 0.15092308819293976, -0.717857837677002, -0.6104295253753662, -0.25063958764076233, 0.3862684667110443, -0.23620137572288513, 0.07497551292181...
longer needed even if the group contains cycles.
[ 0.366977721452713, 0.03550782799720764, 0.1858522593975067, -0.042599260807037354, 0.04920674487948418, -0.37563157081604004, 0.1892363727092743, -0.21229097247123718, -0.28235718607902527, -0.4774608910083771, -0.04894597828388214, 0.24576078355312347, -0.0367058627307415, -0.044540558010...
Why is it that ~2 is equal to -3? How does `~` operator work? Remember that negative numbers are stored as the **two's complement** of the positive counterpart. As an example, here's the representation of -2 in two's complement: (8 bits) ``` 1111 1110 ``` The way you get this is by taking the binary representation o...
[ -0.026799911633133888, 0.06803939491510391, 0.12957951426506042, -0.323825865983963, -0.5415463447570801, 0.2772293984889984, 0.1733318716287613, -0.3212513327598572, -0.05970895290374756, -0.5835538506507874, -0.1361394226551056, 0.15093664824962616, -0.3910353183746338, -0.00571690453216...
how we get ~2 = -3: Here's two again: ``` 0000 0010 ``` Simply flip all the bits and we get: ``` 1111 1101 ``` Well, what's -3 look like in two's complement? Start with positive 3: 0000 0011, flip all the bits to 1111 1100, and add one to become negative value (-3), 1111 1101. So if you simply invert the bits i...
[ 0.07681708037853241, 0.19706667959690094, 0.43543747067451477, -0.3838750422000885, -0.595197856426239, 0.14459921419620514, 0.041661277413368225, -0.4085892140865326, -0.18546807765960693, -0.669669508934021, -0.1374531090259552, 0.5896320343017578, -0.34484896063804626, -0.42411977052688...
I am following the [Getting Started](http://wiki.wxpython.org/Getting%20Started) guide for wxPython. But unfortunately the [first 'Hello World' example](http://wiki.wxpython.org/Getting%20Started#head-6e8427493dcc765fb873a1838adfbd6b8d08e0ee) crashes. The dialog window shows just fine, but as soon as I move my mouse ov...
[ 0.020358480513095856, 0.16909611225128174, 0.5076508522033691, -0.15236058831214905, -0.12007201462984085, -0.0544903464615345, 0.6983646750450134, 0.22391363978385925, -0.3566237986087799, -0.4518676698207855, 0.014650395140051842, 0.44605913758277893, -0.2107192575931549, 0.1842425167560...
I have a flash application that I am going to put up on my website shortly. I want to be able to "lock it" to the site to prevent: * Hosting the .SWF on another site (after an illicit download), and * Preventing the .SWF from opening if included in an iFrame on another site While allowing: * A whitelist of sites to ...
[ 0.7265950441360474, 0.27711203694343567, 0.24544541537761688, 0.04950423911213875, 0.09538207203149796, -0.4783441722393036, 0.1110726147890091, 0.03478800505399704, -0.29224929213523865, -0.7866045832633972, 0.07099992781877518, 0.5357295870780945, -0.21923133730888367, 0.3739486336708069...
Does anyone out there know how to go about doing this? My biggest concern is the iFrame prevention, as when sites steal flash they usually just iframe to your own site to save themselves the bandwidth costs. I'm using Flex SDK (not the Flash IDE) so some pure AS3 code will do the trick for me. This code will report ba...
[ 0.5680229067802429, 0.08091194182634354, 0.1398937851190567, -0.14975741505622864, -0.15302757918834686, -0.4819008409976959, 0.32614588737487793, 0.07115758210420609, -0.2498166859149933, -0.3145075738430023, 0.010992604307830334, 0.664483904838562, -0.3117961585521698, -0.024821527302265...
var fqdn:Array = currentDomain.split("."); var rdi:int = 1; var tli:int = 2; if (fqdn.length == 2) { rdi--; tli--; } return fqdn[rdi] + "." + fqdn[tli]; } ```
[ 0.03607531636953354, -0.6313491463661194, 0.4758862555027008, -0.3128978908061981, 0.13854290544986725, -0.0457376092672348, 0.10085626691579819, -0.47917619347572327, -0.12140187621116638, -0.07951731234788895, -0.3266200125217438, 0.5747337937355042, -0.46151259541511536, 0.1932738721370...
I want to test the dropdownlist autocomplete ajax extension to work. I am testing this in Visual Web Developer Express 2008. 1) I dropped a textbox on the default.aspx form 2) Dropped a scriptcontrol from the Ajax Toolbox 3) Extended the Autocomplete extension to the textbox BTW, at this point, if I display the prope...
[ 0.23850470781326294, -0.03302677348256111, 0.2317708283662796, -0.28703993558883667, -0.2300124317407608, -0.24610228836536407, 0.6057558655738831, 0.08966012299060822, -0.11522934585809708, -0.7150281667709351, 0.02232792042195797, 0.9514309167861938, -0.595578670501709, -0.15742656588554...
C# List, for example, of cities, like: `Copenhaguen, Denmark` `Miami, Florida, USA` `Paris, France` declared directly in the code (not read from a database). At this point, most people are suggesting using jquery instead. I have not been able to find a SIMPLE (non-video) tutorial to set this up! Can anyone hel...
[ 0.6534333825111389, -0.1753080189228058, 0.4181995391845703, 0.2156742364168167, 0.012627796269953251, -0.22100381553173065, 0.233552485704422, 0.6877979040145874, -0.46460750699043274, -0.43742671608924866, -0.44848403334617615, 0.1288270503282547, -0.2783588767051697, 0.06298734992742538...
built on ASP .net web forms. There are some emerging sites using ASP.net MVC, but it's a long way. So, it depends on your goals. If you just need to know "a little .net", go with MVC because the concepts will be known to you. If you need to know "the .net web stack", then most people will thnik of web forms, not MVC.....
[ 0.863537609577179, -0.02848069742321968, 0.10401134938001633, 0.47318917512893677, -0.11759108304977417, -0.24617569148540497, 0.006668722257018089, 0.03979227691888809, -0.26620766520500183, -0.5720036029815674, 0.050278324633836746, 0.5799437165260315, 0.006865834351629019, 0.14166454970...
I want to incorporate a Flash Pre-loader in my application, but I am using only Flex SDK/AS3/Notepad to code this beast. I don't have access to the Flash IDE. There are many tutorials and helpfiles online for how to do it within CS4, but not in the code itself. Can anyone give me direction here? Most examples seem to...
[ 0.6808780431747437, 0.26323002576828003, 0.019620256498456, -0.1417815387248993, -0.05344380810856819, -0.040867213159799576, 0.3994996249675751, -0.004945508204400539, -0.07966915518045425, -0.5271590948104858, 0.0049888393841683865, 0.7273032665252686, -0.19361303746700287, -0.0913117676...
some of the AS3 compiler directives--the relevant one in this case being factory class. Essentially, you will need to create a class to load your main class that extends MovieClip. The 'preloader' class can monitor the bytesloaded/bytestotal and then instantiate your main class. The non-intuitive portion of this (for ...
[ 0.6361147165298462, -0.29156649112701416, 0.2615508437156677, 0.025741277262568474, -0.26917365193367004, -0.2204173058271408, 0.38349536061286926, -0.2263946831226349, -0.1554216593503952, -0.4144604802131653, -0.21239542961120605, 0.6248427629470825, -0.38260504603385925, -0.122297562658...
I'm trying to compose a breakdown of forum ranks on a phpBB forum. Forum ranks are defined by your postcount: if you have between 1-9 posts you're level 1; 10-24 and you're level 2; and so on. (The maximum rank is anything above 2000 posts.) Right now, my forum rank statistics page is just doing a bunch of dumb querie...
[ 0.2159672975540161, 0.12718573212623596, 0.5333046913146973, 0.04640970379114151, -0.5022515058517456, -0.019100748002529144, 0.19601087272167206, 0.05541156604886055, -0.3769570291042328, -0.6828619837760925, 0.3134123980998993, 0.140691876411438, 0.0009601602796465158, 0.3616546094417572...
like there ought to be one query I can run that'll return results akin to this: ``` rank_id | count 1 | 5000 2 | 2000 ... ``` I do have another table which has a listing of the ranks and the minimum number of posts needed to achieve that rank. Not sure if that's necessary or if there's a more clever way ...
[ 0.32480284571647644, 0.2635945677757263, 0.23436897993087769, -0.06037615239620209, -0.2959529459476471, 0.043185051530599594, 0.12518490850925446, -0.22246535122394562, -0.19603177905082703, -0.6615830063819885, 0.20159155130386353, 0.1339932531118393, -0.37663060426712036, 0.308289468288...
COUNT(*) from _users WHERE post_count>=10 AND post_count<25; ``` Alternatively, you could use a CASE WHEN TO stack them and sum the results to get it on one row. ``` SELECT SUM(CASE WHEN post_count>=1 AND post_count<10 THEN 1 ELSE 0 END) AS Between_1_10 SUM(CASE WHEN post_count>=10 AND post_count<25 THEN 1 ELS...
[ -0.10179201513528824, 0.008531454019248486, 0.8004597425460815, -0.22542232275009155, -0.20738135278224945, 0.19841521978378296, -0.05396642908453941, -0.8718387484550476, -0.24580663442611694, -0.5308549404144287, -0.17345215380191803, 0.4060444235801697, -0.21116475760936737, 0.239855900...
CASE WHEN post_count>=1 AND post_count<10 THEN '1_To_10' WHEN post_count>=10 AND post_count<25 THEN '10_To_25' WHEN post_count>=25 AND post_count<100 THEN '25_To_100' ELSE 'Over_100' END As Category FROM _users ) as InnerTable GROUP BY Category ```
[ -0.3115569055080414, -0.08582443743944168, 0.505594789981842, -0.06117255985736847, 0.15308968722820282, 0.13372299075126648, -0.01324932649731636, -0.4364624619483948, -0.2293156236410141, -0.6494370102882385, -0.26264262199401855, 0.2625477910041809, -0.23741690814495087, 0.2578630447387...
Are there free C/C++ and Java implementations of the point-to-point protocol (PPP) for use over a serial line? The C/C++ implementation will go into embedded hardware so portability is a concern. I'm not looking for a full TCP/IP stack, just something to provide a connection-oriented base to build on top of. Your quest...
[ 0.17106571793556213, 0.08687913417816162, 0.2532343566417694, 0.28133392333984375, 0.03038942441344261, -0.27019792795181274, -0.16754120588302612, -0.11379004269838333, -0.38996797800064087, -0.41506701707839966, 0.03940644487738609, 0.1845315843820572, -0.5707837343215942, 0.459944516420...
= new Node(this); } public Node(Node node) { other = node; } } ``` This type of trick can be done in many functional languages and hence any collection mechanism must deal with the possibility of circular references. I'm not saying a ref counting mechanism is impossible with a circular reference, just that ...
[ -0.15460532903671265, 0.13943207263946533, 0.40164321660995483, -0.04818318411707878, -0.25837746262550354, -0.2613983154296875, 0.33793121576309204, -0.4384496510028839, -0.5053174495697021, -0.1775708645582199, -0.14773394167423248, 0.4526853859424591, -0.2825548052787781, 0.034834980964...
NODE of unit -> 'a node val recursiveNode : unit node = let fun mkRecursiveNode () = NODE mkRecursiveNode in mkRecursiveNode () end ``` No mutation required.
[ -0.5227964520454407, -0.3401345908641815, 0.3670978248119354, -0.14946360886096954, -0.05690687149763107, -0.11613109707832336, 0.2168692797422409, -0.08596523851156235, -0.14412875473499298, -0.6368257403373718, -0.7614738345146179, 0.3842039704322815, -0.028999971225857735, 0.17421342432...
I have a web application that currently only supports asp.net forms authentication. My user business logic currently is like: Users.GetUserByID(userID); Users.LoginUser(username, password); i.e. it is pretty modular and I hope supporting active directory won't be difficult. Is it possible for me to support both AD ...
[ 0.5165673494338989, 0.2970021367073059, 0.5667834281921387, -0.03443114832043648, 0.014023777097463608, -0.31069260835647583, 0.29428890347480774, -0.15970082581043243, -0.2774680554866791, -0.7926061153411865, 0.1451573520898819, 0.31364715099334717, -0.15646116435527802, 0.25520271062850...
it simple if it works. Anything that does what you are describing is going to go against the grain of the original model of the web, so you're venturing into shaky territory. I do recommend you check out the [Comet](http://www.google.com/search?q=comet+programming) technique. It is mostly popular for the inverse of wh...
[ 0.3916929066181183, -0.2224937528371811, -0.014506827108561993, 0.27392372488975525, -0.10523977875709534, -0.3006601333618164, 0.1580975204706192, -0.0853762999176979, -0.21241557598114014, -0.15726904571056366, 0.05842757970094681, 0.44554513692855835, -0.32051315903663635, -0.0055866017...
allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term for multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as Javascript, rather than on non-default plugins.
[ 0.13149085640907288, -0.3766493797302246, 0.06574764847755432, 0.4165721535682678, -0.05475977435708046, -0.142638698220253, 0.028851307928562164, 0.03780719265341759, -0.23560799658298492, -0.27967971563339233, -0.514192521572113, 0.196005180478096, -0.045213717967271805, -0.0755432695150...
I have been having this issue with dates since "ever" I live in a country where we use the british date formats e.g. dd/mm/yyyy but everytime I try to do a query to a sql db hosted in a US server, 100% of the time I come accross to errors. `Convert.ToDateTime("2007-17-5")` produces an error where as `Convert.ToDateT...
[ 0.4571214020252228, 0.13567058742046356, 0.5552821159362793, -0.06265946477651596, -0.058670442551374435, -0.17759506404399872, 0.18273429572582245, 0.21394585072994232, -0.10274384915828705, -0.3295912742614746, 0.022782806307077408, -0.020257776603102684, -0.1675901859998703, 0.571728944...
would not cause any problems? or any good resources regarding working with dates ? ----------- editing... ----------------- even if I format the dates correctly, the query to the sql server doesn not produce any value even if I am sure that there are.. for example.. if I am searching for the records that belongs to ...
[ -0.14899194240570068, 0.11766034364700317, 0.6061603426933289, 0.053805410861968994, 0.11965319514274597, -0.03371112421154976, 0.18988804519176483, -0.025240464136004448, -0.4000808000564575, -0.37652215361595154, 0.02759321592748165, 0.16927962005138397, 0.10582297295331955, 0.5358490943...
am entering... **2007-5-17** is not a valid International Date (ISO 8601), **2007-05-17** is. If you are going to be using the International format **CCYY-MM-DD** you need to include the leading **0**s <http://www.w3.org/QA/Tips/iso-date> <http://www.saqqara.demon.co.uk/datefmt.htm>
[ -0.012868800200521946, -0.043491337448358536, 0.5941838026046753, -0.2504640221595764, -0.34728097915649414, -0.21189706027507782, 0.5353229641914368, -0.2064325511455536, -0.2634967863559723, -0.05389156937599182, -0.5223044753074646, 0.023169858381152153, -0.27980342507362366, 0.24189823...