instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
hi where to use onKey and onKeyUp/Down event in android. e.g. i have one textview . when user pressed any key i want to display that character in textview, In this case which event(above) is used. PLEASE explain with EXAMPLE Or give some other example that get the key event and print in edittext or some other....
stackexchange/codereview
Why is it illegal for variables to start with numbers?I know it's a convention but what's the reason? Edit: I mean variables like "1foo" or "23bar" not only numbers like "3"
stackexchange/codereview
I am creating a web service which uses REST web services. The client side code is written in HTML/JavaScript. My dilemma is whether I should use the REST resource directly using AJAX calls? or should I create Servlets/JSPs (where REST calls will be made and data will be sent to client(AJAX/JAVSCRIPT)). I have seen ...
stackexchange/codereview
I am new to both Silverlight and WP7. I have been attempting to hotlink an image by using a HyperlinkButton and setting its content to an Image. However, this just makes my Image disappear. To reproduce: Create a new Windows Phone Panorama Application. On the MainPage.xaml replace the Rectangle with an Image, setting...
stackexchange/codereview
Scenario: I have an ajax autocomplete lookup that grabs data from a memory cache. The autocomplete checks for an expired cache and reloads every minute. Works fine. I'm wondering what the best strategy is for syncing the writes with the cache. Should I update the cache every time a user writes to the db so that the cac...
stackexchange/codereview
I need an example of creating error log file for stored procedure in oracle. please give me an example with table creation and stored procedure creation and error log creation. Thanks in advance EDIT (relevant info from other question) Suppose there is a stored procedure. When I am executing that stored procedure, some...
stackexchange/codereview
I'm using a JavaScript (jQuery) calendar where some calendar events act as links. The calendar events are divs that have onclick triggers that point the browser to the correct page. The problem is that since the calendar event's aren't <a href=".."> links the user can't ctrl+click to open the link to a new tab or shift...
stackexchange/codereview
I want to retrieve the path to a single node in a hierachical database where only the parent node ID is stored as a reference. Could someone give me a query or some advice on how to write a query (ideally the first option - I'm a MySQL noob) so that all the node titles in the end node's path are given in a generated ta...
stackexchange/codereview
I have one window containing an NSTableView listing a bunch of managed objects. I can right click a selection of those objects, and bring up an edit window to edit the properties of those objects (in theory). Here's my code to bring up the window: EditObjController *editObjController = [[EditObjController alloc] init];...
stackexchange/codereview
I'm attempting to develop an application in C#/WPF to aid in studying Spanish vocabulary. Right now I'm simply reading in the vocabulary from a .txt file (the data is simple - a Spanish word and it's corresponding English word separated by a : ) and loading it into a Dictionary. This works fine for a limited amount o...
stackexchange/codereview
For homework I want to draw circles randomly around the screen. If any of the circles overlap, then I want to fill in those circles. I am starting with some code that draws circles on the screen wherever the mouse pointer is clicked. I am really confused about how to use random values to determine the circles and also ...
stackexchange/codereview
I have an XML document with some nodes like <node name="xxx" id="xxx"> Can I use a single XPath expression to get all attribute nodes whose parent has also atrtribute @id = 7?
stackexchange/codereview
If I'm not using garbage collection and I have a auto property set as retain. Should I release the object in my dealloc or does the generated code handle that for me. More clearly, will the following code leak memory if I don't release name in dealloc. Person.h @interface Person : NSObject { } @property (retain) NSStri...
stackexchange/codereview
I am using the Entity Framework 4.0 and have a conceptual model that makes heavy use of inheritance. I can perform the standard inheritance functionality just fine but I am having trouble with the namespacing of the generated C# classes. My problem is that the Entity Framework always generates all the classes (both bas...
stackexchange/codereview
I have one resx file and I want to use it from several solutions\projects , and i don't want to have local copy at each solution(only at compile time bring a copy). Is there some way to do so ? Because when i add it as "Add existing file" it copies me a copy locally. Any idea how to do so ?
stackexchange/codereview
Using .htaccess, how do I convert this URL http://engine.searchr.us/web-search.phtml?search=SEARCHED+TEXT to http://engine.searchr.us/web-search/search/SEARCHED-TEXT.html ? and I should place the .htaccess in the engine folder right?
stackexchange/codereview
Sorry if this question has already been answered but I can't find an answer. Here are some steps I did in three20 project and the problem: I created a three20 class file inherited from TTViewController: TestTTViewController Next, I created a xib file (New File -> User Interface -> View XIB..): TestTTView.xib And the ...
stackexchange/codereview
I have a class A where I construct an object of class B named bb. After constructing the object bb, I run in to a exception in Class A code which is caught by an exception handler. Now my question is how to deallocate the memory of object B in the exception handler?
stackexchange/codereview
Intermediate leaves of clustered index are linked sequentially (next, previous) for faster access (between intermediate nodes) [1], [2], etc.: How this access is used? Why is it needed? [1] Clustered Index Structures http://msdn.microsoft.com/en-us/library/ms177443.aspx [2] Clustered Tables vs Heap Tables http://ww...
stackexchange/codereview
I'm using mootool's Request.JSON to retrieve tweets from Twitter. After I receive it, I write to the .innerHTML property for my target div. When I test this locally as a file, i.e. file:// is in the URL, I see my formatted tweets on the webpage. When I serve this from my local webserver, i.e. http://, the formatted twe...
stackexchange/codereview
When I try to create a DateTime object after receiving the following date format: Fri 01 Oct 2010 12:19:54 AM JMT I parse the day,month,year,time, and timezone. However, creating a DateTime object using an abbreviated timezone does not appear to work. # ... After parsing and converting to epoch... my $dt = DateTime->f...
stackexchange/codereview
I made a few duplicates of my theme at http://www.elizabet.nl/wordpress. All duplicates show correctly in the administration panel, different titles, different folders, different descriptions, etc. However, only the old theme shows up, regardless of which theme dupliacte I activate in the administration panel. Also in ...
stackexchange/codereview
Whenever I create a large Mathematica project I run into this problem: Preventing avalanche of runtime errors in Mathematica, i.e., Mathematica's error message are opaque, archaic, and legion. The idea then is to disable all of Mathematica's own error messages and implement type checking and error messages of your own ...
stackexchange/codereview
I have inherited a Windows service written in C#. Under rare conditions it fails badly. However, it isn't at all clear how to fail well. Ross Bennett states the problem elegantly at bytes.com. For the sake of simplicity I will just quote him here. Ahoy, Folks! I've been looking all over for this, but I just can't...
stackexchange/codereview
I am looking for the sdk links of Blackberry, Android and Symbians mobiles, so that I can make applications on these platforms.
stackexchange/codereview
I need to write an application that (among the other things) renders 2D animated images, let's suppose it's a videogame. Figured out that videogame-like images can have a quite complex structure that depends very little on the program logic, mostly on the image itself: It can have several animations (one for each stat...
stackexchange/codereview
Two Egg problem: You are given 2 eggs. You have access to a 100-storey building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100 th floor.Both eggs are identical. You need to figure out the highest floor of a 100-storey building an egg ...
stackexchange/codereview
I created this class library(ReportLib) with a simple Telerik report using Telerik Reporting Wizard. I then made this simple web application project, added ReportLib as a reference. Now in my asp page, intellisense is not detecting Telerik:ReportViewer tag! In the code behind too I have added the following ;- using Tel...
stackexchange/codereview
I need to parse the following node: <media:keywords>keyword1,keyword2<![CDATA[keyword3]]></media:keywords> into a valid string, preferably "keyword1,keyword2,keyword3" but I would settle for removing the cdata completely. Trying to access the node gives me the text "keyword1,keyword2keyword3" and I can't tell where...
stackexchange/codereview
I'd like to perform an oracle dump of my data and then load it back in after re-installing the software. The problem is however that as I re-install the software, the schema of the data which I just exported may have changed slightly. In mysql, I would hand-edit the SQL formatted dump file before importing it to matc...
stackexchange/codereview
I am trying to make a parser rule which allows for zero or more of a token before a second rule and for which each successive token - of those which were part of the closure - is, in the AST, a child of the previous token, and the second rule is also a child of the last symbol. easier to explain by example... expressio...
stackexchange/codereview
Actually, I have 2 questions... 1)I have a NSMutableArray that i am displaying it in a table view. I have included a search bar for searching the table view. Now i want to add the array to NSMutableDictionary with alphabets as keys. 2)I want to display this NSDictionary in table view as grouped table with numbers and a...
stackexchange/codereview
This happens in IE only (works in Chrome, Firefox): The first time I click on the link, it opens the pop up, the second time, it just redirects me to the page. When I refresh the page, the popup works the first time and then the second time, it again redirects. function popUpWindow(win) { myWindow = window.open(win, ...
stackexchange/codereview
Hey, I want to access the Android call list, so I can see the contact name, the hour of the calling, the duration, the hour of the calling and the date. Where is it, and how can I access it? Thanks.
stackexchange/codereview
In my "InitWithFrame" method of a view I'm setting a tracking area for which I want to capture mouse enter/exit events. My problems are two fold: Without NSTrackingInVisibleRect the events won't be called at all. No matter what "rect" I put it, one that covers the entire view's frame or one that occupies just a small ...
stackexchange/codereview
I want to create an app that accesses the native Apple Messages app - i want to be able to 1. integrate the Apple Messages app inside my app and 2 i want to be able to know when the user sends and when they receive a message - is this possible ? any help or direction on this is greatly appreciate it thx
stackexchange/codereview
I have a DateTimeField field in my model. I wanted to display it as a checkbox widget in the Django admin site. To do this, I created a custom form widget. However, I do not know how to use my custom widget for only this one field. The Django documentation explains how to use a custom widget for all fields of a certain...
stackexchange/codereview
I keep getting the following error when running the fingerprint verification procedure on the Digital Persona Template. I am now at my wits end. My knowledge is short and I don’t have somebody I can turn to. Can you please assist. ERROR MESSAGE Test17.exe raised EacessViolation with message;Access violation at address...
stackexchange/codereview
Possible Duplicate: Python: How to avoid explicit 'self'? In python class if I need to reference the class member variable, I need to have a self. before it. This is anonying, can I not use that but reference the class member? Thanks. Bin
stackexchange/codereview
We are working design of new project where we need to decided framework for caching. We are looking at ehcache and lucene for caching. We need decide whether to use lucene or ehcache for our caching requirement? What are advantage/disadvantage of using ehcache or lucene for caching?
stackexchange/codereview
I have instance inherited from UnityContainer class and want to create additional instance that will "inherit" all registrations of the previous one? Am I correctly understand that AddExtension method do what I expect? public class MyUnityContainer : UnityContainer { public MyUnityContainer(MyUnityContainer containerP...
stackexchange/codereview
Im a java dev. and i now i'm facing with jackrabbit v.1.6.4. Now one of my goal is to create node in a web based jcr browser, so when i have to create node with mandatory property of course the Exception constrainviolation is throw. My Question is exist a way, during the runtime creation to fetch the mandatory propert...
stackexchange/codereview
From what I gather, Gosu is simply C# for the JVM (which is a good thing). Is it true? What are some difference between Gosu and C# (Except the class library and the fact it runs on JVM) ?
stackexchange/codereview
The question may sound weird, here it goes: Sliders in silverlight 3 for windows phone have a thumb but it's set to transparent: <ControlTemplate x:Key="PhoneSimpleThumb" TargetType="Thumb"> <Rectangle Fill="Transparent"/> </ControlTemplate> Everything works ok with the above settings, if I tap the corner (or the ...
stackexchange/codereview
I have a service running a background thread. What I'd like to do is to show an AlertDialog initiated from my background thread. I know that this is not the recommended way of notifying the user and that it interrupts the workflow (as they can pop-up in any application at any time) but it's a suitable way for my us...
stackexchange/codereview
I want to change my NSTimer code to to use applicationSignificantTimeChange This is what I have right now. Basically I want to change the timer, instead of changing every 5 seconds for example I want these textLabels to change at 12am every night anyone help me out? h file NSTimer *timer; IBOutlet UILabel *textLabel; ...
stackexchange/codereview
I am only required to do RTRIM() in some part of query but if i do TRIM() will that affect performance. Is Trim() Slower/Faster/Exactly same(NOT even has negligible difference) compared to RTRIM() AND LTRIM()? This is with respect to Oracle 10g ONLY. But in case of SQL Server 2005, Do we have function / method 'x()' ...
stackexchange/codereview
I need your help or suggestion, whatever. I start reading some books about python just because of this problem I have :) But I see it will takes long time for me to learn the whole language. I also skimmed and searched through lxml.html documentation but still I can figure out how to do this what I want. I created two ...
stackexchange/codereview
I have got the following code to draw a filled circle in opengl. The problem is that it draws at the center of the screen. How do I make it draw in another position of it? Here is the code: #define CIRCLE_RADIUS = 0.15f int circle_points = 100; void draw() { glClear(GL_COLOR_BUFFER_BIT); double angle = 2* P...
stackexchange/codereview
After updating my website on ii7 on window server 2008 from framework 3.5 to work with framework 4 i got my c# base database class stop working copmlitly with this error: "Arithmetic operation resulted in an overflow". I am working with mysql server from different server. I did not find any solution on this so i had ve...
stackexchange/codereview
I use the LostFocus Event in vb.net to check the validity of a field for the name. After this field a have another one which is the for the password validity, and i'm handilg the same event in order to check the password. My problem comes when i run the (name) lost focus, runs the code inside the sub and after that aut...
stackexchange/codereview
I have the following script which works, but has one annoying issue: <html> <head> <script language="javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("visualization", "1", {pa...
stackexchange/codereview
I found and tried Jeff's rules found here but I can't get it to work exactly right: What I need is to have http://a.b.com go to https://a.b.com (where a is not www, but that distinction shouldn't really affect the rule, should it? www is just another subdomain, right?) Where Jeff has (.*)billing/(.*), I replaced with (...
stackexchange/codereview
I would like to update my iPad to iOS 4.2 (I am a registered developer) but I wanted to wait until the final release. Is the GM the final release, or are changes made in the final version after the GM?
stackexchange/codereview
recently i installed rails 2.3.5 using apt-get. After installing rails 3.0.1 the version shows on as rails 2.3.5 when i type rails -v command. How to change that? or can i update rails 2.3.5 to 3.0.1? pls help me out
stackexchange/codereview
Bit of a strange one. I've created a super user for django admin for my app, which is just a new django nonrel project with admin enabled. I try and access the /admin whilst running the development server, but when I type in the (correct) username and password it tells me they are not correct. Deploying the project to ...
stackexchange/codereview
I've successfully managed to get MSTests running for each of the builds on our TeamCity Server. I've got a couple of projects that use NUnit, so was hoping that getting TeamCity to run NUnit tests would be as simple as running MSTests: So when I try to do the same for my NUnit Tests the Testing Tab doesn't show up whe...
stackexchange/codereview
So, I'm writing code for a class that will go into a library that will be used by others. This class will intercept and process incoming messages (details are not important but it's using the activemq-cpp library). The outline of this consumer class is class MessageConsumer { ... public: void runConsume...
stackexchange/codereview
Hey guys, here is one I am not able to figure out. We have a table in database, where PHP inserts records. I created a trigger to compute a value to be inserted as well. The computed value should be unique. However it happens from time to time that I have exact same number for few rows in the table. The number is combi...
stackexchange/codereview
I'm going mad with this regex in JS: var patt1=/^http(s)?:\/\/[a-z0-9-]+(.[a-z0-9-]+)*?(:[0-9]+)?(\/)?$/i; If I give an input string like "http://www.eitb.com/servicios/concursos/516522/" this regex it's supossed to return NULL, because there are a "folder" after base URL. It works in PHP, but not in Javascript, like ...
stackexchange/codereview
(I plan to use my VS2005) Assume that there is not .NET installed on my computer. For the app will run on some computers which there is no .NET environment. I just want to find a good lib on parsing XML in C++. I googled and found LibXML++, XmlLite, and Xerces-C++ XML Parser(Top result from google page). How do I decid...
stackexchange/codereview
How can I compute time difference in PHP? example: 2:00 and 3:30. I want to convert the time to seconds then subtract them then convert it back to hours and minutes to know the difference. Is there an easier way to get the difference?
stackexchange/codereview
We are planning to develop a client side Java API to retrieve stock market data. It is expected to design the API as modular system so that various components can be plugged into the core API to facilitate extended features. Components should be plugged into the core API dynamically and there should be a way to control...
stackexchange/codereview
I'm trying to connect to a game server to get the status of the server. Looking at the connection with Wireshark things should work. Unfortunately when I use fsockopen() the the text gets all garbled with question marks and unknown characters. In places the text is ok so I know I'm connecting and getting some data. ...
stackexchange/codereview
I have a status table, and another table containing additional data. My object IDs are the PK in the status table, so I need to insert those into the additional data table for each new row. I need to insert a new row into my statusTable for each new listing, containing just constants. declare @temp TABLE(listingID int)...
stackexchange/codereview
I'm trying to implement a program that changes a prefix expression to a postfix one using recursion. I've written what I thought would work but instead of the output ab/c*de+f*- I get aa/aa/*aa/aa/*- instead. I think my code is getting stuck when I try to get the first character of String pre or when I try to delete ...
stackexchange/codereview
We have a customized template in TFS 2010 where we basically store some common data in a user Story item and then more details in the various tasks. All tasks are linked to a parent user story and only one parent link exists. What we need to get out is a table of information from the user story and task on the same row...
stackexchange/codereview
I'm trying to query all users who had their birthdays 1-2 days ago, who have their birthday today and in 1-2 days from now. Is it possible to do it in pure rails way, without writing DB specific SQL queries? User model is simple: user_id, name, dob There is a good solution here but it's not exactly what I need.
stackexchange/codereview
Possible Duplicates: Why is (double)0.6f > (double)(6/10f)? Why is floating point arithmetic in C# imprecise? I have the following code in C#: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace StackOverflow { class Program { static void Main(string[] arg...
stackexchange/codereview
Problem WCF requests for my 2 Workflow Services in different Application Pools are not being processed by their respective worker processes. Instead, both worker processes are processing WCF requests for both Workflow Services. This problem only occurs in "Integrated" Managed Pipeline Mode but not "Classic" Managed Pip...
stackexchange/codereview
My grid is not binding properly in IE and I found the reson why it is not working. One of my column values in my grid is showing video and database value is: <object id='video' width='462' height='407' type='application/x-shockwave-flash' data='http://view.vzaar.com/286291.flashplayer'> <param name='movie' value='ht...
stackexchange/codereview
I do need to integrate PayPal on a website with a single click, always the same price and no shopping cart (A Pay Now/Donate Button I guess would ok!). However: I need to have the ability of a custom return URL and need to have a safe Return-URL (including GET Parameters, Token, Checksum or whatsoever). Also IPN should...
stackexchange/codereview
I'm trying to convert packed decimal numbers into ascii strings. Here is my understanding thus far: The following: bcd BYTE 34h Should convert to the decimal number 34 after being "unpacked". Now I'm not sure on the best way of doing this. If I convert this hexadecimal number to binary it is as follows... 0011 0100 ...
stackexchange/codereview
Possible Duplicate: Why web browsers don't have jQuery built in? If jQuery is that great, why then browser vendors do not will to build it in?
stackexchange/codereview
I have a java web application running under tomcat in a Sun java 6 JVM. Is there a way to attach a scala or clojure REPL to the running JVM ? Once the webapp is up and running, the context in which the calls are to be made is already setup in the running VM. Hence, this can be really helpful in invoking arbitrary java...
stackexchange/codereview
I am creating Excel spreadsheets programmaticly (in C#/.Net using the fabulous EPPlus library) and am passing in an array of cell ranges (string-based) and the custom format string to apply to these ranges. // Struct: public struct ExcelColumnFormat { public string CellRangeDefinition; public string ExcelFormat...
stackexchange/codereview
I'm trying to create the installation for my program. If I run msi it always install the exe and dlls into the root intstead of Program files. If I run exe it works good but I need to have msi besides what I don't want. How to solve this problem? Thanks
stackexchange/codereview
I understand that Null Reference exceptions are always generally vague and any number of things can produce it but I'm running out of ideas here... Whats happening is when I try to click on a recipe category link im getting this error: NullReferenceException: Object reference not set to an instance of an object. Compan...
stackexchange/codereview
Sooner or later in each SharePoint developer's life one is fooling around with content types and renames the Title field in the Item base type. This has two effects: All new lists have the new name instead of "Title". All lists in the site collection have their title fields renamed. Now, I've set the Item content ty...
stackexchange/codereview
I need a console application for byte correction, using Hamming algorithm. Can anybody help me on this issue? Input word would be for example: 11100100
stackexchange/codereview
Here is an implementation of a thread safe queue. The push and pop won't block each other. However, pop will wait until an item is pushed, if the queue is empty. Multiple producers and consumers can use the queue. Please tell me if you see any problems. Update: Edited as per answers 1)Resolved the issue of "Queue Full"...
stackexchange/codereview
I need to select all numbers N (integers) between @min and @max Is there any way to achieve that without using a loop of some sort? Example: Let's say @min = 5, @max = 9 I need the following values returned by my SQL query: 5,6,7,8,9 (I'm using MSSQL 2005) Thanks!! EDIT: This is a solution using a custom function, whic...
stackexchange/codereview
On top of visual studio code editor, There are two drop down lists displays list of classes and members in then selected class. See the picture below. What do you call them and what are the shortcuts? So that I can navigate to methods and members using keyboard. I am using Vs 2010 Thanks
stackexchange/codereview
How do i make an intent open an youtube video? Thanks
stackexchange/codereview
I've recently joined the world of Rails app development (Rails3) and I may be abusing resourceful routing. The default resourceful routing makes some really convenient helper methods for the URLs which I use constantly. My problem is that I have controllers that I specified the routing as resourceful simply to take ad...
stackexchange/codereview
I'm very new to android development and to get started I've started modifying the android ask sample 'shape wallpaper'. I've added a touch ripple, change resources etc and removed the more basic example. If I have my se xperia x10 plugged in and run the app it downloads to the phone and once started works great. I then...
stackexchange/codereview
Possible Duplicate: Converting words to numbers in PHP Is there a php function to convert a string such as 'ten' into an integer? If not then how would you go about it? Have tried google and php.net search with no success
stackexchange/codereview
I have a web server with more than a few ASP.NET sites running on it. Every so often, i notice that IIS is pushing the server's CPU to 100%. The sites share application pools, per .NET version they are running. What i'm looking for is a way to be able to pinpoint which site it is that is doing this, using some tool. If...
stackexchange/codereview
I am getting the following warning from my NetBeans IDE. Suspicious call to java.util.Collection.contains Expected type T, actual type Object May I know what does that means? This doesn't make sense to me. Both List and Collection class's contains method, are using Object as their method parameter. import java.util.A...
stackexchange/codereview
I don't know if this was happening in the PR or Beta, but if I create an extension method on HtmlHelper, it is not recognized in a Razor powered page: namespace SomeNamespace.Extensions { public static class HtmlExtensions { public static string Foo(this HtmlHelper html) { return "Foo"; ...
stackexchange/codereview
Is it possible to call a specific task first, when i run a thor task? my Thorfile: class Db < Thor desc "show_Version", "some description ..." def show_version # <= needs a database connection puts ActiveRecord::Migrator.current_version end private def connect_to_database # <= call this always when a t...
stackexchange/codereview
I'm facing this strange problem and I'm not sure where I'm going wrong. Situation: I have a MainWindowController class which will load the correct nibs to be displayed. I created an object and changed it to MainWindowController class in the IB and put it with "MainWindowView" nib. So basically the nib "MainWindowView"...
stackexchange/codereview
I need to return all of the names of people that contain certain letters, or a combination of letters. for example names = bob, mary, nick return names with the letter "b" returns bob return names with the letter "ar" returns mary so SELECT name FROM people WHERE ???
stackexchange/codereview
I am trying to implement the in-App purchase of non-consumable goods. I have implemented the sample code of TROY “In App Purchases: A Full Walkthrough” http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/.I am getting the product information from the server.I am also able to make the purchase that pro...
stackexchange/codereview
I am making an iFrame application for Facebook using the Facebook C# SDK. I have it that the user is authenticating and I can get their username using the Graph API (FaceBookApp.Api("/userid")) My problem now is that when I do an AJAX call to a page I can no longer use the Api. The userid is 0. When opening up FireBug ...
stackexchange/codereview
this is the demo, and the code is : main.js: var worker = new Worker('extra_work.js'); worker.onmessage = function(event) { alert(event.data); }; extra_work.js: self.onmessage = function(event) { // Do some work. self.postMessage("some_data"); } i use the code to run , but it cant alert "some_data" ,...
stackexchange/codereview
What is best approach for converting following jQuery code to MooTools code? $('.some_element a').each(function(){ var arr = $(this).attr('href').split('/'); var last = arr[arr.length-1]; $(this).prepend('<img src="'+last+'" />'); }); Or in plain words - I need to select all links in some element ('.some_element...
stackexchange/codereview
I have a few publicly accessible XML files stored on a webserver that I can update via non-publicly accessible html and php files. I have secured the php files by using sessions and tokens. I was just wondering if there was anything I'm missing. Question: Could any one inject data into XML files by creating their own h...
stackexchange/codereview
This is the first http programming i've done and I'm self-taught so this may be a stupid question... edit:Ultimately my question boils down to: What's a good way to get access to all of the contents of an HttpResponse (i.e. headers + entity) but in my own sweet time? i.e. Download and then let the client process. I've ...
stackexchange/codereview
I have been using .replace("www.", ""); in javascript, but today I was thinking that if an url contains www. in the last part (like someurlwww.com), that will also get replaced. How can I safely cleanup urls protocol+www.?
stackexchange/codereview