text
stringlengths
8
267k
meta
dict
Q: Split Paragraph in Java : Want to store paragraph after particular word address number I need logic, for example I have String explanation = "The image-search feature will start rolling out in the next few days, said Johanna Wright, a Google search director. \"Every picture has a story, and we want to help you disco...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: startActivity with Action and Uri crash the app I want to open a new activity and pass it a URI of local html file(which is in the assets of the project): public void onClick(View v) { Intent i = new Intent("com.appstudio.android.MY_ACTION",Uri.parse("file:///android_asset/sfaradi_mazon.html")); MainActivit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Variable name from macro argument I'd like to do something like this: class SomeClass { }; GENERATE_FUNTION(SomeClass) The GENERATE_FUNCTION macro I'd like to define a function whose name is to be determined by the macro argument. In this case, I'd like it to define a function func_SomeClass. How can that be done?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: php loop doesnt work with $i assigned to a 21 digit number I have a php loop like : for($i = $_GET['start']; $i < $_GET['end']; $i++){ echo $i; } when $i is assigned to something like 100000000000000000000 the script doesnt run and it returns no errors!! is there anywway I can fix this? thanks A: The value you a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Datagrid column sorting problem, sort looks fine visually but the ItemSource is still the same Here is how i defined the DataGrid <toolkit:DataGrid Height="{Binding ElementName=parentCanvas, Path=ActualHeight}" Width="{Binding ElementName=parentCanvas, Path=A...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Call a method from my "MainActivity" in Android I'm currently messing up with the Google's C2DM notification service. Following the steps in this tutorial: http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html, I succesfully recieved a "push message" from the server. However, in the "protected vo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What can I do to fix that Visual Studio won't display per file properties? I went to go turn on precompiled headers in a brand new project, so I went to go create the "/Create" setting for precompiled headers. But the property page is blank. What happened, and how can I fix this? A: This looks like a COM registrat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery.data parsing string like 10E6 as int (10000000) Given an element like this <a data-test="10E6"> jQuery interprets the value as an integer in scientific notaion rather than a string as intended when I do elem.data('test') Given that this is happening in a fairly large application I'm exploring my options for c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Xcode: Why does my UITextField act slow in my UITableViewCell? I have an app where I load a UIViewController with an UITableView. In the UITableViewCells I have a UITextField. Which I have added in the cellForRowAtIndexPath: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Display String array in spring MVC I am trying to display string array in JSP page. I have got a test String array in my controller set this to my registration model String[] test={"ab","cb","sc","ad"}; registration.setTestArray(test); Now I am trying to display it in jsp Its working fine if I do like this <tr> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: DateDiff Missing few records I am using the datediff function SELECT stName ,stId ,stDob --(varchar(15)) ,stJoinDt --(datetime) FROM student stu WHERE DATEDIFF(yy,stu.stDob,stu.stJoinDt) between 18 and 75 Since the between operator is not effective I have also changed the code to SELECT stNa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Javascript Deserialize is returning the class name instead of actual object So I'm running GetServerUpdateProgress() in the controller from a $.ajax call on my page. While debugging I can confirm that the variable: myobj is being properly created and filled with the correct data. But when on the $.ajax success, I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to change the colored background of some text objects in Jellybeans color scheme in Vim? I used to use gVim, but now I am switching to terminal Vim and would like to get rid of some annoying background highlighting which is being rendered under certain text. Here are some examples of what I am talking about: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Error when trying to display a Dialog Had this problem when trying to display a Dialog with a time picker where an exception is thrown if I initialize the TimePickerDialog with the context returned from getBaseContext() as opposed to using a this reference to the current activity. So this code is fine: @Override pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails validates_with error: :attributes cannot be blank I'm trying to use a validates_with validation to some code that makes sure two flags aren't both simultaneously true: validates_with ConfirmationValidator class ConfirmationValidator < ActiveModel::Validator def validate(record) if record.confirmed_good ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using HQL with MySQL how can I order the result set before the group by so the right record is picked? Is there any way to write a greatest-n-per-group query in HQL (or potentially with Hibernate Criteria) in a single query? I'm struggling with a problem that's similar to this: Schema: * *Book has a publication_d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561868", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MySQL Dump Restore What is a good PHP script for restoring a large MySQL database from a local file that has already been uploaded to the server? Thanks. A: if it's an sql file than phpmyadmin is an option or u can do it from the mysql console with the command source
{ "language": "en", "url": "https://stackoverflow.com/questions/7561873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Loading an HTML page in a modal I'm using simpleModal to display a picture slider on my website. The person would hit a button and the modal would pop up with the picture slider inside it. The problem is that I have another picture slider lower on the page. The picture slider only works once on a page. So if I put i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: c# Rich text Format error in code hoping you can help I have the following code List<string> comconfig = populate.resolveconfig(_varibledic, populate.GetVaribles[0].Substring(populate.GetVaribles[0].IndexOf("=") + 1)); //get the aray of strings string config = ""; //create a empty otput string ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Warning: preg_match(): Unknown modifier I'm trying to redirect users to different pages based on OS but keep getting this warning: PHP Warning: preg_match() [function.preg-match]: Unknown modifier '2' in /index.php on line 292 It only seems to happen with Windows NT 5.1 and MSIE 8.0 browser configuration: funct...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: WebSockets receive only "disconnect" I'm trying this simple websocket example on Google Chrome: var wsUri = "ws://echo.websocket.org/"; var output; function init() { output = document.getElementById("output"); testWebSocket(); } function testWebSocket() { websocket = new WebSocket(wsUri); websock...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What other classes do I need? I'm looking to create an application that will be used to help find a suitable University for prospective students to attend (which is based on various criteria about themselves). The application will be used by prospective students to enter details about themselves and a list of Univer...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Java quickly draw image I have a BufferedImage which has a color model type of IndexColorModel. When I try and paint this image using Graphics2D.drawImage() it takes about 30 milliseconds. However, if I first convert this image to a DirectColorModel it only takes about 3 milliseconds to paint. In order to do this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: jQuery UI datepicker: move to the next field after date select I've created a web form that uses the jQuery-UI datepicker. When a date is selected, the focus on the textbox where the date is entered is lost. I would like to make the focus either stay in the datepicker-enabled textbox or else move to the text elemen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to inject one JSF2 page into another with jQuery's AJAX I'm using jQuery's .load function to load one JSF page into another. This works really well until the loaded JSF page uses some AJAX functionality. When this happens, the parent JSF page's AJAX stops working. In fact, after the two pages are combined whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Calling getProgressDrawable() on a RatingBar only displays one star I have a custom RatingBar in my app that should display either the site average rating or the user rating for a movie if a user has rated it. The color should change depending on whether the rating displayed is the site average or a user rating. Her...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Using list comprehensions to remove a list element by index A table is a list of lists, where the data is set up as follows: data Position = CEO | Manager| Programmer | Intern deriving (Eq, Show) data Field = EmployeeID Int | T Position | Name String | Salary Int deriving (Eq) instance Show Field where show (E...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to cast with GSON Is there the way to cast a string value within json to an int-, long- or double-member using GSON? What I mean, I have a json string, something like this: {'timestamp':'1243274283728', 'distanse':'122.1'} And I want to map this json string to object of following class: public class TestClass {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: plotting the real time data after certain specified interval in Matlab I have a question that I dont know how to figure it out. I am plotting my real time data obtained from temperature sensors in MATLAB. The sensor software generates the text file for each sensor and updates it after every minute. What do I have to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: It's possible to do a array of Matrix in Matlab? I'm doing a project in a University here in Brasil, and I'm using MatLab. I'm new in it, so I have to search a lot. A problem that's disturbing me right now is that I need to store many Matrix of different sizes in a Array. The code is: for count = 1:nColors i = rgb2g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Restrict input to a specified language I use a TextInput component of Flex 4.5 to enter some text in English. I use the restrict attribute to ... restrict the keyboard input to characters a-zA-Z only. The problem is that if i copy/paste a word in another language, i can then paste it into the TextInput component. Is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Migrating django auto model loading to iPython .11+ - how to execute code after script loads? I'm having trouble migrating my old iPython ipy_user_conf.py script to the new .11+ iPython. Before, loading models was as easy as this snippet in ipy_user_conf.py My manage.py sets the django environment so iPython could i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: POSIX sh Redirection I may be missing something small, but is it possible to achieve this syntax in a POSIX (dash) compliant way: $ ./myApp 2> stderr.txt 1> stdout.txt I know in dash you cannot use >& but have to use 2>&1 but I do not want to do this. I have tons of data coming to stdout and I do not want to parse ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WCF customBinding problem I've been playing around with a pollingDuplex example that is driving me nuts. I'm using a customBinding to integrate the readerQuotas element and I keep getting the error: "Contract requires Duplex, but binding 'BasicHttpBinding' doesn't support it or isn't configured properly to support i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assembly Language: printing lowercase to uppercase I have an assignment that is described like so: - Reads printable characters (20h-7Fh) from the keyboard without echoing - Uppercase letters are printed to display - Lowercase letters are converted to uppercase and then printed to display - Blank spaces and periods ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to display full screen iAd on iPhone? I just recently read that full screen iAd only works on iPad. Do you think it is possbile to show a full screen iad banner before user to click it on iphone? A: Full screen iAd are ADInterstitialAd available only since iOS 4.3 and for iPad ONLY. Hope this helps A: I just i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the largest value a long data type can hold I believe this question is sort of open ended, but I am seriously struggling. I keep getting an over flow. I have two longs. The first is set to 16552800. I can add 32760 to it no problem. However I get an overflow error when I add 32820 to is. Any ideas?!?!?! Than...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Mapping *.MVC to aspnet_isapi.dll on IIS7 We have a .net 3.5 application (MVC and WebForms mixed) that was hosted on IIS6. In order to make it work on IIS6 we had to add custom mappings to IIS such that *.MVC would map to aspnet_isapi.dll. So our URL's would end up looking like this: <host>\someController.mvc\acti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Hash collision in Hashmap I need a simple scenario to produce a hashing collision in a HashMap. Could someone please provide one. Is it possible to produce hashing collision if my hashmap keys are immutable? Regards, Raju komaturi A: You could create your own type and create a bad hash function: public class BadHas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-6" }
Q: is it possible to register event handler like this? Why doesn't it work? <body> <p id="element_id"> blah </p> </body> var pcontent = document.getElementById('element_id').innerHTML; function exit(){ document.getElementById('id2').innerHTML = pcontent; } var a = '<div id="id2"><input type="b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the difference between compiling and refreshing a materialized view? We just ran into a problem where materialized views weren't refreshing, and giving a compile error. One of the senior developers says he just figured out how to fix it -- by telling toad to compile the materialized view. So my question is pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: chosen.js :: Does anyone have an actual working example? Has anyone used and customized some basic chosen.js code? I have downloaded the js, css and png, copied some code from the examples, wrote my own super-simple example, but I must be missing something. I have verified that the code.jquery.js is included and get...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Simple JavaScript/HTML Slideshow New to Javascript, but after some research it loks like this would be the best method in implementing my desired output. I'm trying to produce a slideshow of images (5 pre-selected images) that automatically change between 5 second intervals. Can anyone point towards a tutorial or gu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Disable UIView respond to UIIntefaceOrientationDidChange I have a uiimageview within a uiview and I would like it to not rotate when uiinterfaceorientationdidchange is called but I would like everything else to rotate. Right now everything is rotating, how can I set certain objects not to rotate? A: A UIImage has a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android: How do you remove the selection behavior from the Gallery? I really need horizontal scrolling in my app, so I overrode Gallery and I'm trying to do something with an OnItemSelectedListener, and a GestureDetector I'm calling from an OnTouchListener I've set on the Gallery. What I want is to remove the auto-s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: make .combine function scaleable I am trying to use foreach and am having problems making the .combine function scalable. For example, here is a simple combine function MyComb <- function(part1,part2){ xs <- c(part1$x,part2$x) ys <- c(part1$y,part2$y) return(list(xs,ys)) } W...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Workaround Way To Install Numpy? Right now I have a script which uses numpy that I want to run automatically on a server. When I ssh in and run it manually, it works fine. However, when I set it to run as a cron job, it can't find numpy. Apparently due to the shared server environment, the cron demon for whatever...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MPMoviePlayerController does not load first video in scrolling gallery I'm developing on iOS SDK 4.3. I have an horizontally-scrolling paged gallery that can display images or videos from a remote feed. For the paged views I'm using the publicly available ATPagingView: pages are reused similarly to TableViewCells. B...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does PHP have no length argument on functions which deal with binary data? Why is it that functions that deal with binary data dont have length arguments? I come from a C background, so this is really confusing me. I thought that perhaps the string object holds the length, but that doesnt appear to be the case (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: adding UILabel in Objective-C, change Background Color I add a UILabel using objective c, have a white rectagle around them. How do I remove this rectangle so the background shows through? I looked in the documnetion for uilabel view and did not see anything per to background. code UILabel *mContact=[ [UILabel al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using RSA for hash I am pondering creating a hash function (like md5 or sha1) using the RSA crypto algorithm. I am wondering if there are any obvious reasons that this algorithm wouldn't work: * *Generate RSA public/private keys. *Discard private key, never store it at all. *Begin with a hash with a length of t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: jQuery/XML return the current target li id from an xml node for individual functions I need to return the current value of the selected video-thumb li, so if I click on the 2nd li return id is 2 etc. What I currently have returns 2 if I select both the first and second li. I will eventually need to fire a differen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to bind a jQuery plugin to an element in ASP.NET code? I have a jQuery plugin which works like most plugins in this format $(somelement).SomePlugin(some options); one of the options is a string. Now I have a situation where the string is determined during runtime in ASP.NET in code behind and it's different for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rebasing everyone onto changed git history after filter-branch Our git repo has a bunch of large files in its history that are no longer needed. I want to remove them using the filter-branch technique explained in Pro Git: http://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery I'll then use git pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to set the plot in matlab to a specific size? Generally, I wish to plot a rather complex x-y plot (lots of overlapping curves) to an A3 format so: A4 210x297 A3 = A4*2 = 420 x 297 ... - 10mm each side = 400 x 277 (size of desired plot window) What is the easiest way to set the size of the plot so it fits th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7561999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Correct HTTP Status Code when rejecting a request because User-Agent header is invalid I'm currently working on an HTTP based API. Our terms of use require the user to send an appropriate user-agent header (e.g. "-" is considered invalid). Now I'm not quite sure which would be the correct HTTP status the server shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sessions vanishing when doing a header redirect with php Only impacts Internet Explorer and Firefox (works in chrome and opera). When I try to do a header redirect the session is dropped. For an example I wrote the small bit of code below as a test... Page1 (test.php) <?php session_start(); $_SESSION['testvar']=t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sending user results by Email Hi I am wondering is there a way of sending the user an email (from my Gmail address) with results of calculations that occurs within the app itself? For example a form is filled out with values for electricity rates and these rates are then computed and processed into information on sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Help understanding jQuery jQuery(function ($) {..} I am trying to learn jQuery and came across some code that started like the above statement. What does that mean? A: That is a shortcut for: jQuery(document).ready(function($) { // ... }); It sets up an event handler for when the document is ready to have its...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is sub-domain considered cross-domain? Is http://nonsecure.form.xyz.org and https://secure.form.xyz.org considered different domain? I am asking this because my javascript in secure one cannot call it's parent. Secure domain is inside non-secure domain through an iframe. EDIT Conclusion You can perform cross-domain...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: RegEx for UK area codes. I need to be able to validate UK telephone numbers when input and present them in the correct format when displayed. I have seen several unfathomable RegEx examples but they don't get the right format for all UK numbers or reject some valid formats (or allow some invalid formats). I found a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to quickly insert huge datas into datastore while running on GAE development server? Background: While coding on GAE's local Development Web Server, user need to upload Mega-level datas and store (not straight forward store, but need many format check and translate) them into Datastore using deferred library. Us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Out of scope and Invalid Summary error on NSArray I am trying to create the UIPickerview as described in the iPhone development book by Dave Mark. I have a NSArray which is declared as a property in the h file which will store the data for the UIPickerview. So here is what I have: in the .h file: @interface RootView...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Seg fault when trying to use strtok() on a 2D array I was hoping someone could help me figure out why I am getting a segmentation fault on my code below. My user has inputted a line of text, which is passed to the parse function. The parse function should initialize a 2D array (I would ideally like to dynamically al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Entity Framework - Problems to update user information I'm new to Entity Framework, and I have to update a record in my database. I used the "Edit" example generated by the MVC3 framework and tried to customize to my needs. I have a password field and before submit it to update I need to encrypt it with MD5. All pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562048", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: API for getting movie soundtrack list Is there any free API for getting the list of soundtracks from a given movie? Thanks A: IMDB seems to be the best place for soundtrack lists. This might be what you want: http://www.deanclatworthy.com/imdb/
{ "language": "en", "url": "https://stackoverflow.com/questions/7562055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: web analytics software which can analyze existing log archives too I am looking for a web analytic solution which can also help me to analyze my existing log files. we are moving from sawmill to other solutions.. explored Google Urchin and it has some limitations on analyzing custom existing logs. Currently explorin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: rails - email activation upon user signup I want the user to click on an activation link before being "activated" or before they can log in with the email/password. I am not using an gems and want to keep it that way. My problem is that after the user registers, they can login in without clicking on the activatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CodeIgniter - modular? I'm building several sites that need similar "modules." For example, the sites may have the exact same login system, forum, etc. Is there a way I could build these modules once and just "drop" them in these various sites? Some of the challenges I see: * *Keeping the code consistent in the v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How could I add this attribute? I have a class that is called ShapeBase. It is abstract and draw method must be implemented. It has instance variables for things like width and height. From this, Circle, Line, and Rectangle are subclasses and implement the draw method. The Line class does not have an isFilled proper...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it okay for a model to populate its own properties? If I have a model that essentially represents a single row in a database, is it scale-friendly and test-friendly, and all around okay practice to have it populate it's own properties, or should it have its properties injected, the same way you would inject an ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: DB4O performance retrieving a large number of objects I'm interesting in using DB4O to store the training data for a learning algorithm. This will consist of (potentially) hundreds of millions of objects. Each object is on average 2k in size based on my benchmarking. The training algorithm needs to iterate over th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562086", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Puzzling Problem - C# Lambda Delegates disappearing after I can't post a full working example right now, but I was hoping someone would have an idea of what might be going on here. (I'll try to toss together a small working sample later this evening if no one can explain what might be happening from what's posted) L...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to create a menu 'toolbar' like on the default Google homepage? I am trying to create a homepage with a 'toolbar' look like the one that is used in the default google homepage. I have managed to put some HTML and CSS together, but I still have not been able to work out how to do the following two things: * *H...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562089", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Require file including variable I am currently using the following code to include a file in my webpage: require_once $_SERVER['DOCUMENT_ROOT'] . '/include/file.php'; However, I have now edited my system so I input the URL into a data file in the root which makes other parts of my site function and allows me to use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Parsing data from text file into multiple arrays in Java Let me start by saying I am fairly new to Java so forgive me if I am making obvious mistakes... I have a text file that I must read data from and split the data into separate arrays. The text file contains data in this format (although if necessary it can be s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Redirect on select option in select box At the moment I am using this: <select ONCHANGE="location = this.options[this.selectedIndex].value;"> it redirect me on the location inside of the option value. But it doesn't work as expected .. mean that if I click on the first option of the select, then onChange action not...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562095", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: Compile-time constant id Given the following: template<typename T> class A { public: static const unsigned int ID = ?; }; I want ID to generate a unique compile time ID for every T. I've considered __COUNTER__ and the boost PP library but have been unsuccessful so far. How can I achieve this? Edit: ID has to be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: IPhone: File Upload using dispatch_async for background upload I want to perform a image upload while the running application at the background. I am able to upload the image to the server using the code on this link. How can I upload a photo to a server with the iPhone? I heard the NSUrlConnection can be asynchron...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Scaling limited API requests over time for large bundles of requests I'm implementing Klout API with a web application I have been working. Klout allows you to do 10 requests / second, and 10,000 / day. Each user account can view N other user accounts with their Klout scores. Would the best way to gather this inform...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the purpose of a ModelLocator Singleton in ActionScript The use I have for it is for storing user credentials, and calling a transfer object that functions as a sort of "cache" for the current session in all of the flex modules. Thinking about objects that have to be present in every module. Is there any alt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using chardet to detect bad encoding in a MySQL db with JDBC Recently we moved our mysql db from Latin1 to UTF8. After trying a few different approaches to convert it we weren't able to find any that didn't also introduce some pretty nasty dataloss (and many simply did nothing). This left me wondering if we have lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Android Google Maps API Key I'm developing an app that uses Google Maps. I got the debug keystore and got the API key to work while I am debugging my program in Eclipse, but I am thoroughly confused in how to change this so that it works on an Android device when I export the .apk. I have searched around Google, but...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iPhone app, alert users when they aren't connected to the internet? What's an easy way to code an alert that warns users when they aren't connected to the Internet? I'm using Xcode, right now when there is no connection it is just a white screen in uiwebview. A: Here you can check if wifi has connection, 3g,or no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562119", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jQuery popup with faded background conflicts with transparent PNGs I'm building a popup shopping cart in a webshop, which acts like a kind of lightbox. The cart pops up when it should, and the background fades to gray when it should. Problem: some elements in the page light up when fading, this is very ugly. I'm usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Check if remote file has changed I'm using PHP cURL module to extract timestamp of a remote file via HTTP headers. I've managed to grab modification timestamp by using CURLOPT_FILETIME constant. Of course, I'm doing this in order too see if the remote file has changed without downloading it's contents. $ch = curl_in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: syntax error, unexpected '}' I am at a loss and I've spent a few weeks reading site after site to try and understand what I can do. The problem is that I am learning as I have been doing since I have a website - mostly the hard way. ;) I would be very grateful if you can help me. This error is related to wp-content...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a good example of an MVC framework in practice? I have read hundreds of articles on models, and how they are used in the MVC framework. However, I've had a hard time finding a good example of one being used in the wild. I feel like seeing something that goes beyond the limits of a tutorial would help me und...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Making ruby faster for memory intensive programs I'm running a pretty memory intensive program in ruby which is fast initially and then slows down as the memory utilization increases. The program has two phases: (1) build a large hash: string => list in memory, (2) do some computation on the hash. The slowdown occur...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Singleton design pattern in a Cluster environment Singleton object will create instances per jvm basis. How it works in clustering environment? What are the alternatives? A: Technically, you can use Terracotta to cluster the JVM. I think it will guarantee the singleton instance. But I think it's not what you want....
{ "language": "en", "url": "https://stackoverflow.com/questions/7562138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Error when trying to cast from System.Double to System.Single I am sure this will turn out to be something simple. I have the following Silverlight 4 C# code: Rectangle r = new Rectangle(); r.Stroke = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255)); r.SetValue(Canvas.LeftProperty, 150f); r.SetValue(Canvas.To...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Winforms: How to Bind a List to multiple DataGridView I want to be able to bind a List to multiple DataGridViews such that manipulation through one of the gridviews would be propogated to all other gridviews. List<Domain> data; 1st approach: BindingList<Domain> list = new ..; data.ForEach( d => { list .Add(d); } );...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: drawImage() not drawing pre-loaded image object. Using OO javascript I'm writing a simple 2D side scroller game using JavaScript + Canvas. I am trying to do this while learning OO JavaScript. I'm encountering an issue where my image will not draw to the canvas, despite being loaded correctly. Here's the code: //=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Override CSS and HTML Styles in Outlook 2007, Word 2007 In Internet Explorer 8, it is possible to override CSS styles and HTML tags using: Tools -> Internet Options -> Accessibility (button) -> Format documents using my style sheet (check box). There I can specify a file containing my own CSS snippet. Specifying the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delete an user in Active Directory via C# I'm trying to delete an user in Active Directory via C#.When I attempt to run the following the code,I got an error. Error Message: A local error has occurred Code: DirectoryEntry ent = new DirectoryEntry("LDAP://192.168.1.99/OU=FIRMA"); ent.Username = "idm\administrato...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to retrieve users given user_level in rails Here is two models: user and user_level. User has_many user_levels and user-level belongs to user. class user < ActiveRecord::Base has_many :user_level end class UserLevel < ActiveRecord::Base belongs_to :user end UserLevel.find_by_role('sales') will retrieve al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I configure the Airbrake gem to log all Rails exceptions in both development and production environments? I have found it difficult to send exceptions of my Rails 3 app via the Airbrake gem. At first I thought there was an Airbrake configuration error on my part, but after trial and error and reading the docu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: "Unhover" CSS-animated DIV on iPhone I have the following HTML: <div class="gallery" id="gallery-tl" title="<strong>My Title</strong>"> <div class="slides" id="slides-tl"> <img src="img/project-tl-01.png" alt="Shot"> <img src="img/pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562167", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Google maps: zoom in/out with panning to specific point like in maps.google.com context menu I have a project with google maps. I want to emulate maps.google.com context menu with Zoom in and Zoom out actions. The google.maps.Map.setZoom() is zooming map to the center point but in maps.google.com when you right clic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using setTexture for animating in Cocos2d? Let's say that I got 120 image files in my project. And I want to animate a sprite with all of them. I was thinking about this method: CCSprite *temp = [CCSprite spriteWithFile:@"TheNextSprite.png"]; [sprite setTexture:[temp texture]]; The above cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/7562172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }