text
stringlengths
8
267k
meta
dict
Q: Boost.Assign: using objects with map_list_of? Using C++ with boost. In Boost.Assign can I use the new operator with map_list_of? For example: std::map<int, MyObject*> objects = boost::assign::map_list_of (1, new MyObject())(2, new MyObject())(3, new MyObject()) If not, is there another way to do it? A: It ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531878", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Sorting and manipulating a hash in Ruby In my rails 3.1 project I have a Book model that has a ID, NAME, and BOOK_ORDER. I am using the ranked-model gem, which for its sorting process creates large numbers in the sorting(:book_order) column. Im looking for some help to create a method to sort all of the Books by the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531880", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: No gcc 4.2 compiler option in Xcode 4? In my Xcode 4 installation, I only have 2 compiler options: * *Apple LLVM compiler 3.0 *GCC LLVM 4.2 In many Xcode examples I have seen that GCC 4.2 is shown as a third option, but this simply isn't there. I intentionally did a clean installation of XCode 4. Is there a st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the fastest way to find a file in a directory tree I have a directory tree similar to the one below. It contains around 30,000 files in total. rootDir rootDir\subDir1 rootDir\subDir1\subSubDir1 rootDir\subDir1\subSubDir2 rootDir\subDir2 rootDir\subDir2\subSubDir1 rootDir\subDir3 ... rootDir\subDirN What is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: User interface is not visible when the app runs (only in interface builder) I'm stuck on a very stupid issue. I've built my mac osx app user interface with Interface Builder (and xcode3). Now when I run my app I can't see the app window (but only the menu on top). The MyDocument.xib file is correctly loaded (from xC...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: function of searching a string from a file This is some code I wrote to check a string's presence in a file: bool aviasm::in1(string s) { ifstream in("optab1.txt",ios::in);//opening the optab //cout<<"entered in1 func"<<endl; char c; string x,y; while((c=in.get())!=EOF) { in.putback(c); in>>x; in>>y; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: wchar_t NUL in managed/unmanaged C++ I need to use this (unmanaged) C++ library. One of the methods has a wchar_t* as a parameter. Tried using it in C#, but all my attempts resulted in an error code 'invalid argument'. I wrote a managed C++ wrapper for it - same problem. Now I compared the values of arguments from m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Wordpress - MooTools sub-menu not working correctly I have installed the Akiraka theme from RocketTheme and am trying to get my sub-menu's working. Currently when I hover over the main menu item a white box displays where the sub-menu items should be. The site is: http://testing.bfcmv.org/ I have compared everythi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531906", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does one create a SugarCRM View that combines 2 Detail Views I would like to extend the Contact Detail View so that a Detail View of the associated account appears on the same view. MY instinct is to override the display function for the Contacts Detail View and from there create an instance of the Accounts Deta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Remove .php from URL and force a trailing slash / I want to use .htaccess mod_rewrite to remove .php from all my files and force a trailing slash /. However, it is only resulting in me getting server errors. A: You want to map : http://sampledomain.ext/index/ -> http://sampledomain.ext/index.html Use the following...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CURL and ZLIB Compilation When compiled correctly, how are these two associated together? I'm attempting to use the ZLIB library in my CURL install and want to confirm that I've compiled CURL and ZLIB correctly. Should the libcurl.lib now have all of ZLIB after a successful compile or is the zlib.lib library still r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531912", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Carrierwave + Fog (S3) + Heroku: TypeError (can't convert Hash into String) I have an application on Heroku that uses Carrierwave to upload images to S3. The app is running perfectly on local machine but on Heroku throws the following error and fails the uploading to S3: TypeError (can't convert Hash into String): 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531915", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I find strings and string patterns in a set of many files? I have a collection of about two million text files, that total about 10GB uncompressed. I would like to find documents containing phrases in this collection, which look like "every time" or "bill clinton" (simple case-insensitive string matching). I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531919", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Converting an UploadedFile to PIL image in Django I'm trying to check an image's dimension, before saving it. I don't need to change it, just make sure it fits my limits. Right now, I can read the file, and save it to AWS without a problem. output['pic file'] = request.POST['picture_file'] conn = myproject.S3.AWSA...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Unexpected results after joining another table I use three tables to get to the final result. They are called project_board_members, users and project_team. This is the query: SELECT `project_board_members`.`member_id`, `users`.`name`, `users`.`surname`, `users`.`country`, `project_team`....
{ "language": "en", "url": "https://stackoverflow.com/questions/7531924", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why isn't this working for recursively reading from hash? @hash is a global hash that looks something like: @hash = { "xmlns:xsi" =>"http://www.w3.org/2001/XMLSchema-instance", "xsi:noNamespaceSchemaLocation"=>"merchandiser.xsd", "header" =>[{"merchantId"=>["35701"], "merchantName" =>["Linger...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Django foreign keys - one class has the same relationship to multiple other classes I have a model with three classes: PendingAuthorisation, Director, and Member. Director and Member instances are considered inactive if they have a corresponding PendingAuthorisation. My problem is quite how to model this. I would id...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Implementing Seam Carving Method in C# I would like to Scale an Image from 640x480 to 64x48. There are different approaches used by the picture manipulating programs like Gimp and Photoshop. For eg.Gimp uses liquid rescale algorithm and photoshop uses path match algorithm for better scaling. Both uses Seam Carving a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CreateFileMapping for Directory I have this function which gives the full file name(path) from the file handle. The only problem is CreateFileMapping fails for directory handles. Is there a workaround for it? I get the handle using NtCreateFile() ULONG status = NtCreatefile(&f, GENERIC_ALL, &oa, iosb, NULL, FILE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531933", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Qt “forgets” to link one of my “moc_MyClass.o” objects The source file is clearly in the project, among the rest of my classes. I have Q_OBJECT defined for the class, like the rest of my Qt Classes. My class compiles with the rest of the classes. Yet, the linker fails on the vtable for the constructor/destructor for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why not change color when pressed? when you click the color should change to another but it doesnt work! My code: # public class CreateActivity extends Activity { TableLayout table; Integer i; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Adding a wireless AccessPoint through the Smart Device Framework I have a couple questions: In general, what is the general difference between the OpenNETCF.Net namespace and the OpenNETCF.Net.NetworkInformation namespace in the Smart Device Framework? There seems to be a lot of functionality overlap between the two...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python range function Say I want to loop from 0 to 100 but with a step of 1/2. If you try for i in range(0, 100, 0.5): whatever Error: the step must not be 0 Question: Is there any built-in way in Python 2.x to do something like this? A: You have to use integer steps for range() and xrange(). That's why you...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Why won't my Admob Ads show up in my android application? I have made an application for the Android Market and I tried to include an Ad in it using Admob. I have everything set up correctly, but the ad doesn't show up no matter what I do. If I check the Admob Marketplace I can see that there were a lot of requests ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531947", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I execute query using job and convert result grid to text? I need to execute query and convert result to text. I know how to do it within Management Studio. But I need to do it within stored procedure and saved output result to text column A: The query itself has no idea what a grid or text pane is - these ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531949", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android: Accessing resources without an Activity or Context refeerence I am posting this question in the hope that I can get some kind of definitive answer. Is it really impossible to access resources without an activity or context reference. Passing around such references when all that is required is to access some...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: UPLOADIFY loader hangs on 0% when trying to use scriptData I found a bug while using uploadify. When I user the scriptData attribute to pass post information to the script the loader does not work. The script is actually called and the items are uploaded but the loader hangs on 0 %. When you user multiple files it w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VS 11 does not pay attention to install location I've download VS 11 Developer preview. I do not have sufficient disk space in my C drive, so I entered "E:\Program Files\Visual Studio 11\" as the install location and the installer continues, but after a while, my C: drive goes out of disk space and I get the followi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to add custom Haml helper to Rails project? I've created Haml helper and put it as file in path app/helpers/haml_helper.rb module Haml::Helpers def build_segment(files) files.each do |f| if f[:dir] == nil haml_tag :li do haml_tag :a, :class=>"file", :href=>f[:name] do f[...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Json encode an entire mysql result set I want to get json with php encode function like the following <?php require "../classes/database.php"; $database = new database(); header("content-type: application/json"); $result = $database->get_by_name($_POST['q']); //$_POST['searchValue'] echo '{"results":...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Maven GWT Plugin copies multiple versions of the same snapshot jars I have this issue where I build my project (mvn clean install), some of the transitive dependencies are snapshot versions and are downloaded and copied into the target webapp directory e.g XXXUtil-1.0-20110922.172721-52.jar. Then when I run mvn gwt:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Constructing Strings using Regular Expressions Assuming you have a a set E = {a,b}, and you have a superset E* consisting of all possible combinations of a, and b in E. How do you construct an expression for a String that has number of a's divisible by 3? A: Try /^(b*ab*ab*ab*)+$/ Examples: abbb => N bbb => N aaa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Change colour of TLabel in FireMonkey iOS app, and add items to TStringGrid? I managed to get Xcode (running as a VM under Windows) pushing an XE2 build FireMonkey iOS HD app to my (jailbroken) iPhone after XE-script-prep (creating the Xcode folder), with a valid company certificate. Anyway, faking the native coco...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Large sample database for HSQLDB? I'm taking a database class and I'd like to have a large sample database to experiment with. My definition of large here is that there's enough data in the database so that if I try a query that's very inefficient, I'll be able to tell by the amount of time it takes to execute. I've...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Inserting irregular data into SQL Server I have a file of data which I want to regularly insert into a table in SQL Server 2008. The file contains several fixed width text fields and one field which is free text and very long. When I try to insert the data via SSIS I get error messages telling me that data has been...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using Regex to replace a specific string occurrence but ignore others based on neighboring characters I have a string "sub section 15(1) of main section, this might be a <link href="15(1)">15(1)</link>". I want to use the Regex.Replace method to replace "15(1)" with a new string value of "15" but only where it...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to fetch all the links starting with http://plus I have a pregmatch with the following search : $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; now how can I reformat this to look for something like : href="http://plus I dont want the entire thing to be changed , just that part for the hre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to instantiate a static vector of object? I have a class A, which has a static vector of objects. The objects are of class B class A { public: static void InstantiateVector(); private: static vector<B> vector_of_B; } In function InstantiateVector() for (i=0; i < 5; i++) { B b = B(); vector<B>.pu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Android setImageUri not working with asset Uri I am using the following code to set an image from the assets folder. Uri numBgUri = Uri.parse("file:///android_asset/background_numbers.png"); numBgImage.setImageURI(numBgUri); The background_numbers.png file definitely exists in the assets root directory. I am getti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What does a single splat/asterisk in a Ruby argument list mean? I was poking through the Rails 3 ActiveRecord source code today and found a method where the entire parameter list was a single asterisk. def save(*) I couldn't find a good description of what this does (though I have some ideas based on what I know ab...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to scale down blocks without causing pixel overlapping I have a bunch of blocks that needs to be drawn into a grid. Now displaying them unscaled everything is fine but when I try to scale them down to fit withing a window I get "scale-artifacts" because I use a normal scale-ratio formula and floats. Is there a w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7531996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use an ArrayList java object passed into the Rhino javascript engine? The following data: sku=[111222] is being passed in as an argument to a javascript function being invoked in the Rhino javascript engine. On the java side (where the data originates) this means that a String key of "sku" is mapped to an Ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Drupal Site Slow, Drupal Tweaks my site is very slow and i disabled the bulk of modules, so I think it was my hosting, first I upped the memory limit from 90M to 256M which helped with "500 errors" but the site is still very slow. I am thinking it may be the database settings, I am changing them with the module "dru...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Defining POJO id in Spring form for single object this is what controller sends to me: model.addAttribute("weather", weatherService.getWeatherByCity(id)); this is my JSP: <form:form commandName="newWeather" method="post" action="edit"> <c:forEach items="${cities}" var="city"> <form:input path="temperatu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532011", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: DosBox on Windows Phone 7 and Android? Is there any port of DosBox on Windows Phone 7 and Android? If not is it any good VM of any old hardware (QNX, DOS (DJGPP, Watcom), Amiga) for both Windows Phone 7 and Android? Basically I am trying to emulate my own game written in Allegro 4.2.3 on both Windows Phone 7 and And...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: FreeBSD: Questions about NIC ring buffers, mbufs, and bpf buffers I've been going through many technical documents on packet capture/processing and host stacks trying to understand it all, there's a few areas where I'm troubled, hopefully someone can help. Assuming you're running tcpdump: After a packet gets copied...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532017", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to open 3 different PDF reports in a single window? I am generating 3 different PDF reports with a servlet. There are 3 checkboxes in the JSP. If I click on all the 3 checkboxes, the PDF report will open in 3 windows by JavaScript. But I want them to be opened in a single window. How can I do this? Here is the J...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: pygtk OSError: [Errno 2] No such file or directory. subprocess.Popen PIPE command I'm new to python and I'm trying to make a search bar that searches only 2 directories using two find commands and output the results into an ordered list []. def search_entry(self, widget,): s1 = subprocess.Popen(['find /...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add attribute '_meta' to an object? I'm trying to add the django-voting app to my project. I don't know how to use it in my templates, so I'm adding a new template tags for voting up or down when an user click in buttons. I don't know if there's a well form to do it. My problem is with these kind of line in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I don't understand the error on eclipse Please somebody can help me with my error, there is nothing on console, but I can't run the project. This is creenshot: thanks for help A: Click on the Problems tab at the bottom, see what the error is. A: Clean your projects by going Eclipse>Project>clean A: Try cleaning ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: what is wrong with toDateString Following is a script+HTML that tells the user his last visit to page. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Cookie</title> <script type="text/javascript"> window.onload = initLastVisit; functio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532031", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Getting a shell error code from curl in Jenkins while still displaying output in console I am using a shell script in Jenkins that, at a certain point, uploads a file to a server using curl. I would like to see whatever output curl produces but also check whether it is the output I expect. If it isn't, then I want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Difference between "(NSSet *)touches" and "event.allTouches" in "touchesBegan:withEvent:" I need to move, rotate and zoom an UIImageView object. In the method... touchesBegan(NSSet *)touches withEvent:(UIEvent *)event which touches do I have to use? (NSSet *)touches or event.allTouches In other words, where are m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Replacing multiple substrings in Java when replacement text overlaps search text Say you have the following string: cat dog fish dog fish cat You want to replace all cats with dogs, all dogs with fish, and all fish with cats. Intuitively, the expected result: dog fish cat fish cat dog If you try the obvious soluti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Why is my CSS not working and Div's collapsing? I think I must be having a Friday moment, but why are my DIV's all collapsing and the styles not taking effect on the following link http://s374335087.websitehome.co.uk/help.html A: I don't think a CSS class name can start with a number.
{ "language": "en", "url": "https://stackoverflow.com/questions/7532043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Finding a grid in an image Having a match-3 game screenshot (for example http://www.gameplay3.com/images/games/jewel-quest-ii-01S.jpg), what would be the correct way to find the bound box for the grid (table with tiles)? The board doesn't have to be a perfect rectangle (as can be seen in the screenshot), but each ce...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Strategy for dealing with floating point inaccuracy Is there a general best practice strategy for dealing with floating point inaccuracy? The project that I'm working on tried to solve them by wrapping everything in a Unit class which holds the floating point value and overloads the operators. Numbers are considered...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: writing xml data to sql server using sqlbulkcopy in C# asp.net I have two xml files on m system called customers.xml and customerdetails.xml. I am attempting to write this data directly to an sql database I created in asp.net. All of my coding is in C#. The sql database contains a table called CustomerDetails which ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Download grid view and some text into a excel in asp.net website I am binding data to a grid view. string MysqlStatement = "SELECT TimeReceived,TimeRead, Concat(FirstName,', ',LastName) as Name FROM tbl_usermessage INNER JOIN tbl_user on tbl_usermessage.UserID = tbl_user.UserID WHERE MsgID = @Value1"; using...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get All Strings between tags and echo them? Possible Duplicate: Get content between two strings PHP Ok, here is my delima: here is an example of my $content : <!--nextpage-->First Title Here<!--nexttitle--> some more text here and here and here and here a little more here! <!--nextpage-->Second Title Here<!--...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Why isn't RAM as fast as registers/cache memory? Why do we need to cache in Cache Memory? Why cant RAM Memory be made as fast as register or Cache Memory or Cache be as large as RAM Memory (4GB) so that everything can be in cache? Any good article/books to understand these concepts? A: Faster stuff costs more per b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532057", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Modal view not displaying properly I am writing an iPad app and want to put an option on the home screen (root view controller) to allow users to e-mail feedback. I would like the mail to appear with the style "UIModalPresentationFormSheet". However, when I run the code, it appears full screen. What am I doing wro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Assign names from one list to another I got a bunch dynamically created regressions stored in some list called regressions. Now I´d like to rename their coefficients efficiently. What I have so far is this loop that works: for (i in 1:length(params[,1])){ names(regressions[[i]]$coefficients)[pos] <- paste(params[i,1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Parallelize while loop with OpenMP I have a very large data file, and each record in this data file has 4 lines. I have written a very simple C program to analyze files of this type and print out some useful information. The basic idea of the program is this. int main() { char buffer[BUFFER_SIZE]; while(fgets(bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Java: Exception in constructors: Problematic or not? I am recently thinking about if throwing constructor from Java is good or not. Currently this is what I gathered: * *Can constructors throw exceptions in Java? Here, Mr. StackOverflow (aka Jon Skeet) does not seem to hold anything against it, but he did hint abo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to properly add an Android library to a previously made Android project? I'm trying to add a 2.2 sdk to my project and can't seem to figure out how. I tried adding it as an external JAR in the Android sdk folder but ive encountered some errors. How could I add another Android sdk to a previously made Android pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Form submit values not recognized in jQuery code I have this form: <form name="form" method="post"> <div> <p> Problem Name: <input type="text" size="20" name="problem_name"></input> </p> <p> Explain the problem </p> <p> <textarea name="pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532082", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Facebook fan page going immediately to wall after like, used to go back to the app I use fan gates on a lot of different fan pages. The idea has always been you land on the page and see a like us to gain something after clicking like the page reloads and now the user sees the content behind the fan gate. I noticed t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Powershell assign multiple ip addresses to adapter I want to write a powershell script to create a loopback adapter and assign multiple ip addresses to it. You can see where I am getting the adapter and then have an if statement that works based on whether or not it already exists. In the if statement I'll want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: error "The connection to adb is down" when run an android app I'm new with android development, and I have problems installing all the recent platform. I'm a java developer that I would like learning android. I've installed all programs succesfully in windows xp sp3 (JDK 1.6 with environment vars created, eclipse 3....
{ "language": "en", "url": "https://stackoverflow.com/questions/7532087", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to install pymorph on windows? I am very new to python so sorry if this is a trivial question. I am developing on windows and I want to install the following library pymorph I know it can be installed on linux but how to install it on windows enviroment ? Thanks A: Download the package. Extract the package, cd ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ComponentOne wijmo data-binding I wasn't able to find the answer to this question in the C1 documentation. Is it possible to bind the ComponentOne wijmo grid to the DefaultView of a System.Data.DataTable? The examples I've seen show the grid being told where to find a MS-Access MDB file and the grid's datasource is...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to use JQuery .live() without any human interaction, i.e click etc? Here is my code that auto refreshes a div containing tweets pulled from twitter: var twittercacheData; var twitterdata = $('#bottom-bar').html(); var twitterauto_refresh = setInterval( function () { $.ajax({ url: 'twitter.php', ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Facebook integration Adobe AIR iOS and Android I was wondering if anyone has had experience using AS3 Facebook integration on mobile devices with Adobe AIR for iOS packager or Android? Ive used the Facebook API for AS3 before for websites but not sure it its feasible using it inside an iOS packager application? All ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: DDMS : java.lang.nullPointerException at com.android.ddmlib.Client.sendAndConsume i has create android_2.1 emulator , when ever i rum any application , after some seconds CONSOLE will generate error like that [2011-09-23 21:53:43 - ddms]null java.lang.NullPointerException at com.android.ddmlib.Client.se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Questions on string.xml and size of the icon In string.xml, <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">nameofmyapp</string> </resources> I wanna change the text size how do I do that..also I want to increase the size of my icon which appears on my phone.. I tried google's http://an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How does #import work in iOS' UI Automation? I'm making a small test framework that uses the JavaScript module pattern for UI Automation testing on iOS. However, I seem to be getting odd results based on #import and extending modules. I have the base test module called Tester-Module.js: (function() { var Tester = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Vertex Buffer Objects with SDL When using SDL 1.2, what do I need to include to be able to use OpenGL Vertex Buffer Objects (VBOs)? Currently, I only include SDL.h, SDL_opengl.h, SDL_image.h And get the errors: glGenBuffersARB, glBindBufferARB, glBufferDataARB not declared in this scope A: If you want to use SDL_op...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532110", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: isGUIInitialized() is false, now what? I been looking at some code and I find people doing public static void main(String[] args) { new ExampleCode(); } ExampleCode () { EventQueue.invokeLater(this); } public void run() { if (EventQueueMonitor.isGUIInitialized()) { guiI...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a simpler way to calculate this MD5 hash? I'm working on implementing a hosted checkout, and the hosted checkout is supposed to redirect the user back to my website so that I can show a custom receipt page. This is a sample querystring that I'd get back: trnApproved=0&trnId=10000000&messageId=71&messageTex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: redirect to same site, but different link (javascript) I want that people in "example.com/index.htm" get redirected to "example.com". but the code is being tricky. It always takes me to a loop. <script type="text/javascript"> function check() { if (window.top!="example.com") { window.location="http://example.c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532116", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make Label's text centered vertically? I tried one by one each of these methods : setting the BgAlign property to CENTER in the Resource Editor , myLabel.getStyle().setBackgroundAlignment(Style.BACKGROUND_IMAGE_ALIGN_CENTER); but the text of the Label is not centered vertically. So how to make Label's text ce...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add a custom parameter to a default action in routing Can you please help me? I got stuck! I implemented a single table inheritance for a model "Customer". "Person" and "Company" are "Customers". So I added two new routes to forward all requests to the CustomersController: resources :customers ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jquery/prototype conflicts in Magento This is a Magento store based on the Acumen theme from Themeforest. Seemingly out of the blue, jquery stuff is now not working. Acumen has jquery loading through a magento static block and none of that has been touched. Yesterday I was working on adding the jquery.clearfield.j...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: parsing code into components I need to parse some code and convert it to components because I want to make some stats about the code like number of code lines , position of condition statements and so on . Is there any tool that I can use to fulfill that ? A: Antlr is a nice tool that works with many languages, has...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to keep an image inside the screen limits while using pinch zoom and drag gestures? I'm building an app that uses the pinch zoom and drag. The problem is that for now I can drag the picture out of it bounds. I wanted to know how can I use drag and make sure the image stays on the screen at the same time. Here i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: PHP Warning: stream_socket_client(): Failed to enable crypto? I'm using swiftMailer to send email using SMTP directly. I get this strange error: 2011/09/23 17:59:01 [error] 489#0: *1032 FastCGI sent in stderr: "PHP Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1407...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Create folders from folder id and parent id in java I need to make a class that get the list of folders stored in a database and creates them on the local machine in the correct hierarchy. The folders are arranged on the database like so: id name parent_id 1 documents 0 2 movies 0 3 videos 0 4 my files 1 5 desktop...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Anyone know how to open a fb fan page in iphone app from web page? I'm trying to open my facebook fan page in the fbook app from a web page in safari. I found What are all the custom URL schemes supported by the Facebook iPhone app? and I've tried setting the link to * *fb://pages/[pageid] *fb://pages/?id=[page...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: I am trying to Post Data to an Iframe in asp.net. The post is performed using HTTPRequest and HTTPResponse I am trying to implement Single Sign On allowing the users to sign on to multiple vendors. Each vendor has token that need to be send as a form post. I am posting this token as HTTPRequest and getting the Res...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PDF to Jasper XML I have a PDF file (softcopy) which was created using iText. Now my company decided to use JasperReports for new release. I need to use that PDF file (softcopy) and need to design JasperReports template and need to populate data. Do we have any plugin in JasperReports that can convert from PDF to Ja...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: TFS Merging keeps merging some files without any changes For some unknown reason, TFS seems to keep queuing certain files for merges, even though there are no changes. In the Pending Changes windows, the Change column only states Merge, and not the usual Merge, edit or Merge, branch. Nobody touches these files and y...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532146", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: git over ssh: Repository read access denied I have a git server set up on Linux, and it's working great: [git@HOST ~]$ git clone -v git://HOST.com/repositories/Extras Cloning into Extras... remote: Counting objects: 12, done. remote: Compressing objects: 100% (12/12), done. remote: Total 12 (delta 3), reused 0 (delt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: I/O performance of multiple JVM (Windows 7 affected, Linux works) I have a program that creates a file of about 50MB size. During the process the program frequently rewrites sections of the file and forces the changes to disk (in the order of 100 times). It uses a FileChannel and direct ByteBuffers via fc.read(...)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532165", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Disable fast delete on UITextField So, I have the delegate method - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { running to check if a textfield has a minimum of 1 character in it. Well, if the number of characters exceeds 20 or so, whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532170", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how do I split string equation into its own array of strings? Possible Duplicate: How would I Evaluate a certain formula? How would I split this formula into an array of characters each having their own number in the array: a1+a2+a5*((a1+a6)*a3) one I have added the spaces I am going to get column 1 because a1 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: In emacs, query-replace-regexp keyboard shortcut doesn't work in the terminal (e.g., emacs -nw) Is it expected that C-M-% and ESC C-% do not run the command query-replace-regexp when running emacs in a terminal window (for example, emacs -nw)? According to describe-function the binding exists, but emacs runs query-r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Script forgets search keyword When I go to the next page(from index.php to index.php?page=2), the script forgets search keyword "for example country=US" and shows in the next page default option (country=). Then I also tried to add(WHERE country='".mysql_real_escape_string($_GET['country'])."') ,but in this way I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I mysqldump the contents of a few tables or just the schema? Can you help me with the following: * *dump from the database just the contents of a few tables? *dump just the schema? A: mysqldump -u username -p database [table] > file.sql Use the --no-data option to dump just the schema. mysqldump --no-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: View Database Columns via Checkbox WebFrom and Cookies I am using the telerik MVC template and have a database that has a huge number of columns and the telerik grid does not have a horizontal scroll bar, so I created checkboxes for the user to select exactly what columns they want to view. It works well enough in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7532196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }