text
stringlengths
8
267k
meta
dict
Q: WCF Data Services with Custom Entities I have a set of custom entities which reflect the business representation of data. Then I also have a set of entities that map 1-to-1 to the database that represent the storage of the data. My business layer converts between the 2 types and performs any other logic needed. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I use two datasources in a CFQUERY? I am using ColdFusion 9.1. I need to use two different datasources in some of my queries. I know it can be done because I see other code that uses two different datasources and it works fine. I've tried lots of combinations but can't get anything to work, but I know that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: ASP.NET Permission Frameworks? Problem ASP.NET has no concept of associating permissions to roles. My app Current web application is using custom user membership and role providers. The app has 4 roles: superuser, admin, principal, and teacher. When the user logs in, they are redirected to their appropriate UI. F...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Help with an if then statement. Apple Remote Desktop and setting Computer Info Field This is a great script for network admins. It's able to set the AppleCare expiration date of the computer the script is run on in a computer info field allowing for easy sorting in Apple Remote Desktop. My issue is when a computer h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Saving URL content with javascript and pass it to PHP as variable I want to save the url content of some website with javascript (from a client side) and pass it over as a variable to my php file, it's ok that the javascript will be in the php file. is there a way to do so? A: from javascript to php you have to use...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSF 2 facelets in template and page I have the following template (masterLayout.xhtml): <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <f:view contentType="text/html"> <ui:insert name="metadata"/>...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: to OLAP or not to OLAP I want to ask what are the performance gains of pulling reports in Sharepoint 2010 directly from an Oracle DW using an ODBC Connection as opposed to building an OLAP Layer using SSAS and accessing the data that way. A: It sounds like you're confusing terminologies and technologies. Comparing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: EXC_BAD_ACESS error I get that error EXC_BAD_ACESS at the following line: NSString *titleVarName = [[NSString alloc] initWithFormat:@"%@%@",@"occasionTitle",i]; Here is the for loop where the above code line is located: for (i=0; i < count; ++i) { //Save the occasionS details to NSUserDefaults NSString *...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Multiplying a matrix and a vector in GLM (OpenGL) I have a transformation matrix, m, and a vector, v. I want to do a linear transformation on the vector using the matrix. I'd expect that I would be able to do something like this: glm::mat4 m(1.0); glm::vec4 v(1.0); glm::vec4 result = v * m; This doesn't seem to wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574125", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What's the difference between adding and cloning a remote repository? What's the difference between adding a remote repository and cloning a remote repository? I'm reading the pragmatic guide to git and they are talking about distributed environments and using git remote add. I'm finding the section difficult to und...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which version TortoiseHG and Mercurial are compatible and stable for Linux RedHat ? I am thinking about installing Mercurial and TortoiseHG for our redhat linux server. I found out there are many package versions. I searched online and found out some people encounter incompatible problems when they install Mercurial...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: splitting a delimited field into separate columns in same record I need to split a pipe-delimited field ('Y|N|Y|Y'). I found the recursive function listed here T-SQL: Opposite to string concatenation - how to split string into multiple records but it creates the values into new records. row field 1 Y 2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Showing one row for each calendar week in SQL I have a SQL query which pulls unit sales by item, by week: SELECT sls_vendor, sls_item, sls_units, DATEPART(week, sls_week) AS sls_date FROM mytable Assume I'm looking at a 8 week period, but not every item/vendor combination has a full 8 weeks of sales...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JDBC returning MySQLSyntaxError Exception with correct statement I'm writing an application in java which communicates with a MySQL db, and while I was testing it I noticed that the code to insert new rows in a table threw a MySQLSyntaxError Exception, so I tried to execute the same INSERT using MySQL Workbench, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to add large amounts of HTML to IE without crippling the CPU i've been experimenting with a more ajax approach to loading data on a page, mostly to avoid postbacks. i can easily acquire server-constructed html via an ajax call and adding it to the dom is simple enough with the help of jquery's .append or .replac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Compile only some classes in project Is there a way to only build certain classes? I am testing code in one part of the application and I don't want to have to change it all across the program if it is not going to work correctly. A: You have multiple possibilities: * *Select the file you want to compile, then s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how can I display a ABPersonViewController with Edit button in a UIPopOverController I am trying to enabling the editing of a Contact in a universal app, with a ABPersonViewController displayed in a UIPopoverController. The person does get displayed, but there is no Edit button. In actual fact, I would prefer it if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .NET 4: Can the managed code alone cause a heap corruption? I have a heap corruption in my multi-threaded managed program. Doing some tests I found that the corruption happens only when the background threads active in the program (they are switchable). The threads use some 3rd party components. After examining the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Jython wsadmin: get nodeName of server In Jython WebSphere Wsadmin: It appears that I can get to the server's names from the nodeName, however I haven't managed to find a direct way to find the nodeName of a server. I thought about creating a map of all the nodes, but that is expensive. Can anyone help? A: You can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574158", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: javascript document.write vs jQuery replaceWith I have some pages that will use the path portion of the URL to place text on the page, like so.. urlPath=window.location.pathname; urlPathArray = urlPath.split('/'); urlPath2=urlPathArray[2]; if (urlPath2 == "sometext") { document.write("Title for Some Te...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to read until a given character in Lua 5.1? Up to lua 2.4, there used to be an readuntil function that can read until the first occurence of a specified character; in 2.5 this is removed and you have to pass an appropriate pattern to file:read instead; and in 5.1 it seems that the available formatting option for...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: submit one or another query I'm continuing to hack away at my newbie php/mySQL 'Invoicer' app. I now have a form page in which I want to run one of two queries - either an INSERT or an UPDATE, depending on whether an ID is present. When present, the ID is used to retrieve the record and pre-populate the form accordi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574166", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Tried everything, but can not remove duplicate XML lines using xsl stylesheet As someone new to xsl, I have tried various examples from these posts, but for my particular XML file I cannot remove duplicate "TaskName" lines. I HAVE been successful eliminating multiple "ResourceName" entries, but only want a given tas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Solving android SDK "failed to parse output of adb version" I've run into the "failed to parse output of adb version"... i done it before and managed somehow to make it work again, but this time all my efforts were in vain. So please help!!! I've tried: * *closing the adb process from taskmanager or by cmd, by "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Is there any graphic effects library compatible with MonoTouch? Is there any graphic effects library compatible with MonoTouch? I can't find any library, not even one able to do a simple sharpen or a "non fake" motion blur. :( Thanks in advance. A: MonoTouch is build upon Mono which again is C#, so I think you shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Lead backslash at the beginning of dynamic class name The code: $className = '\MyNamespace\MyClass'; $object = new $className(); throws error 'Class not found' But this code: $object = new \MyNamespace\MyClass(); is not. First code fragment works at staging but not at my local. Do I need to enable something at my ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pantone Color Picker I'd like to use a color picker on my web site similar to http://www.eyecon.ro/colorpicker/#about, but which only allows the choice from set Pantone colors (instead of all RGB / HEX colors). Does anyone know if this exists? It looks like something like the "Really Simple Color Picker" at http://...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574194", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: need help with this compile error for getline function error: no matching function for call to 'getline(std::istream&, char&)'| I have a source code file with getline function in it and I receive and error when I compile it (code and error below). My problem is that I copied and pasted the whole function from an al...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you test methods as you are coding? Currently using VS2010 Ultimate. In a prior version of VS there was a utility that you could use to test methods while you were coding (Some sort of test bench, I think). The benefit of this, was in the case of a large web app, you didn't need to spin up and wait for the en...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to validate a JSON String JQuery I tried that: var c = $.parseJSON(something here) and I control that: c === undefined This works however it throws error while trying to parse an invalid JSON string. I don't want it throw that error. Any advices? A: It's generally considered bad practice to suppress/ignore e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574208", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: **make: *** [out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.dex] Error 1**** Im new to Linux.Im porting android on devkit8000(copy of beagleboard) but getting so many errors in compiling the android source code.Below is the result of "make" command. ============================================ PLAT...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574211", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Keydown in jquery - Can I target specific letters with any kind of plugin? I need to call a function when a certain letter is pressed, i.e. pressing 'l' changes a div's class, and pressing 'g' changes it to another class. Can this be done natively in jquery, or will I have to find a plugin? Thanks. A: jQuery: $(doc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I change a string twice (building on the previous changes) in Java? (code inside) for example, say I have a string called names and I want to .toUpperCase and then use the .replaceAll function before printing it. The problem I'm having is that only one step is applied at a time and the two functions are hand...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574213", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: call Actionscript method from JS without loading SWF Well yeah, it sounds funny, but all I want is to read the value of Capabilities.version to get the right version of the Flash player? I have tried getting the version info from swfObject library, but it doesn't give the complete version info: http://www.adobe.com...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574215", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I programmatically add build files to Xcode4? I've been trying to figure out how to programmatically add files to an Xcode4 project and it seemed like AppleScript would be the way to go, however I'm running into "missing value" errors. Here's the code I've got: tell application "Xcode" set theProject to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Access as the front end and sql server as the backend I have some Access tables with many number of fields. I have migrated each access table to 6 or 7 sql server tables. I am using sql server 2008. Now I want to use Access as the front end so that I can enter the data in access but it will be stored in sql server. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: jQuery webcam: Save mode results in: ''error: No save mode compiled in." I am currently implementing a photo snapshot function to allow users to set their profile photo via webcam. To accomplish this, I am using jQuery Webcam Plugin. The problem arises in that I would like to have the user click a "Take Photo" and h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to disable concurrent gc for C# class library I have found answers to disable concurrent garbage collection for an application that uses config file. But my C# app is a class library built for ArcGIS, and don't have a config file. How to disable the concurrent gc in this case? Thanks! A: The decision over whic...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OCaml: applied to too many arguments Why the code if some_bool_var then begin output_string some_file "some string"; (* <--- error here *) end generates "applied to too many arguments" error. But if I change it to if some_bool_var then output_string some_file "some string"; it compiles fine. Why is it so? Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: How should I go about capturing a custom form in Magento that is stored with the order? I am working on a module to add a new step called Rental into the Onepage Checkout module in magento. The problem is not adding a step it is the data capture. I want to be able to take the custom form I have created and store it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android - How to accept any certificates using HttpClient and passing a certificate at the same time I have a scenario in which I must pass a certficate to my server, then the server sends me his certificate, which I must accept to access the server. I was using HttpURLConnection for this, with no problems. However,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to change UdpClient IP address? Is there a way to change the UdpClient IP address on the fly? StartUpd() throws a System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted even after doing a StopUpd(). private static UdpClient udpClientR;...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Extending existing project and installing both of them at same time on android mobile Hi i made an app barcodescanner using ZXing project.actually i added some code in this BarCodeScanner project now its running fine on my wildfire s and on emulator.but when i installed zxing barcode scanner app from android market ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: gcc dump resolved defines I have code like #define ONE 1 #define TWO 2 #define SUM (ONE+TWO) How do I dump SUM as "3", the resolved value, in gcc 4.3+? gcc -dM -E foo.h only seems to dump it as is. How do I get the actual value like it's inserted on compilation stage? A: You can't. As far as the compiler is conce...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574245", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Oracle free space after deleting data from tables I recently deleted a big chunk of data from some tables in the database. Now I wish to free up the space that was being held by that data. After that I would like to rebuild indexes. What is the best way to free up the space? A: What do you mean by "free up the spac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574251", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to manually set an array in Java? How do you manually assign variables to an array? I have a code fragment below. I don't want to manually put shortStraight[0] = "211100", shortStraight[1] = "021110", and so on. Any help? private String [] shortStraight; public Sample () { shorty = new String [12...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574252", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the proper/canonical way to serve JSON data with Django? I would like to deliver JSON responses with Django to my jQuery based clients. I could just design a template that instead of markup delivers JSON, but there must be a way to do this easier. What is the common practice in the Django community? A: If u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574257", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java. Save file as root in Linux How I can save file generated by java application in folder with root access? A: The straight forward way to do that is to run your application as the root user. Another solution is to ask to the user the root password. To do that, you have to ask the "su" command of your system. Be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574258", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Connection Reset on Large File Upload Regardless Correct Setting I am having a very common problem which it seems that all the available solutions found are not working. We have a LAMP server which is receiving high amount of traffic. Using this server, we perform a regular file submission upload. On small file ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: NSTableview and SearchField I have an action for searching in NSMutableArray with name searcharray, which is equal to array with which NSTableView are connected.And I wrote a method for adding items to TableView just by sending NSMutableArray to my method. The problem is that after searching if I delete what I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Regular Expression replace single character in a word multiple times I have the following string: INSERT INTO testtable ('Reference', 'Date', 'Address', 'Amount', 'ChequeNo') VALUES How would I return only the quotes ' I basically need to do a replace on all the quotes from INSERT INTO up until VALUES as its invali...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574263", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iOS Game Center: Creating Lifetime Achievements I'm trying to add a Lifetime achievement to my iOS app. That is, how many times the user performed the single action since he played the game for the first time. In other words, how many kills he got since... ever. I'm using the code based on the one provided by Apple:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574265", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can windows managed service be a wcf client? On 1st server, there is wcf service hosted in windows managed service. On the 2nd server, there is another wcf service, hosted in their own windows managed service. I try to connect to 1st service from the inside of the 2nd service, but I become a exception "The socket co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: DataGrid, Star, Auto, layout I have DataGrids that are getting resized when certain Grids are collapsed. In the default scenario, I'd like to have two rows in a column be like this: <Grid.RowDefinitions> <RowDefinition Height="0.65*"/> <RowDefinition Height="0.35*"/> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: If I remove a git submodule... is it REALLY gone from the repo? I have, for the last year, TouchJSON via a submodule. I no longer need to use the library and want to remove it but I am not sure if doing this: How do I remove a submodule? will remove even the 'history' of TouchJSON. basically, if I delete the submodu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574283", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Word2011 doesn't support "FormattingShowClear", causing a problem on restricted style templates I have created a Word Template I would like to use in a mixed Office 2010/2011 environment. I am restricting formatting to using recommended styles, which removes the ability to select font, font size, etc.... However I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NSMutableDictionary vs CFMutableDictionary I have a requirement for a dictionary with keys that are not copied. This has lead me on a merry dance and I've ended up at the door of CFMutableDictionary. I am trying to understand the extent to which they are interchangeable. In Apple's docs for CFMutableDictionary they ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Django makemessages ignore switch doesn't work for me I have problems localizing a django-nonrel project, which is deployed to GAE. Because of GAE I have to put everything into my project folder, so it looks like something like this project + django + dbindexer + registration + myapp ... + locale + tem...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: c# read byte array from resource I've been trying to figure out how to read a byte array from one of my resource files, I have tried the most popular hits on Google without clear success. I have a file stored in the resource collection of my program, I'd like to read this file as a byte array I'm currently just read...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Efficiently compute Intersection of two Sets in Java? What is the most efficient way to find the size of the intersection of two non-sparse Sets in Java? This is an operation I will be calling on large sets a very large number of times, so optimisation is important. I cannot modify the original sets. I have looked a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574311", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: Running a Loop through $message in mail() This is a follow on to this question. I'm putting together a simple HTML email confirming an order to my database. As each order is obviously dynamic, i need part of $message to run through a loop. For example i query my database outside of the $message and end up with $ema...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Data extraction recommendation software (email, name, country) I would like to extract some data from plain files (thunderbird mailboxes, html files, csv). I usually get strings like this (into files) user: pepito phone: 11233213 email: user@domain.com Then I am searching a software that lets me extract by string (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Interpolate Django template include variable I'm doing something like {% for part in parts %} {% include "inc.html" with o=part prefix="part{{ forloop.counter0 }}_" %} {% endfor %} where inc.html could be something of such kind: <p id="{{ prefix }}para">{{ o.text }}</p> I just discovered the prefix variable i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Jquery fullscreen image with borders I have some code which gives me a fullscreen image which is kept in its original proportions (ie. landscape is fully stretched width ways and portrait height ways). I need to be able to have varied borders around the page (ie top:100,left&right:120,bottom:200) that the image will...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Referenced WebService not showing up when I attempt to debug my code I am in the process of attempting to consume a WCF webservice in my application, but after adding the service reference and the appropriate using statement, I am unable to compile my code, and I get the following error 11 times with 11 line numbers...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can you set up Eclipse to remove trailing whitespace when saving a JavaScript file? I am running Eclipse 3.6 (Helios 20110218-0911) on Ubuntu 11.04. Under Preferences, I have gone to the following panel: JavaScript -> Editor -> Save Actions. The "Additional actions" checkbox is checked and "Remove trailing white...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: IOS simulator problem app only runs when started for the second time.. My app runs fine on my physical device (iphone 4), it also runs fine on the IOS simulator, but only after the second time I ty to run it from Xcode. So the sequence in which things are happening is: * *IOS simulator closed. *I press "ctrl R"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing size of MainWindow.xib's Window Is there a way to change the dimensions of the main window in Xcode, the Window object stored in the MainWindow.xib from an iphone size to an iPad size? Other dimensions are editable of other nib file objects, like views, etc, but the main Window appears to not be. If it can...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Custom date units for javascript I'm working on a javascript app that does a lot of Date arithmetic, and for convenience (and readable code), I've found it useful to create some constants that I load into each page: var oneSecond = 1000; var oneMinute = 60*oneSecond; var oneHour = 60*oneMinute; var oneDay = 24*...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574349", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Segmentation fault using FFTW I have a pretty involving program that uses an in house FFT algorithm. I recently decided to try using FFTW for a performance increase. Just as a simple test to ensure that FFTW would link and run, I added the following code to the beginning of the application, however, when I run, I ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Recursive data structures in haskell: prolog-like terms I have a question about recursive data structures in Haskell (language that I'm currently trying to learn). I would like to encode in Haskell Prolog-like terms, but every solution I came up with has different drawbacks that I would really like to avoid. I woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Remove javascript console sentences from source using gsub Im noob in ruby and i coding a simple rakefile ... one of my task remove from javascript files the "console" lines, what do you thing about the current snippet? def self.remove_debug() FileList[File.join(DIST_DIR, '**/console-nodebug.js')].each do |file_n...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails 3.1 Jquery Ajax CRUD Operations I am working on Rails 3.1 Jquery Ajax demo app listed here https://github.com/samnang/ajax_rails31_demo. I am trying to add code to delete comments. I have modified comments_controller.rb and added a destroy action. I also added a link to the app/views/_comment.html.erb to in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Producing lists in Intl/ICU with PHP I'm using PHP 5.3's Intl extension for formatting strings on my website. However, I have happened upon a string that requires a list of items. The list given to the website can be any number of items, and should appear in however the language renders lists. In English, it would a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Pulling from a very very specific location imbedded in a text file I finished every piece of code in my program save for one tid bit, how to pull two numbers from a text file. I know how to pull lines, I know how to pull search strings, but I cant figure out this one to save my life. Anyways here is a sample of the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android Different paints for Textsize Is it more efficeint to create a new Paint() or modify and exsisting one when you want to print something in a different font size or style? - this is for a game so the changes would be made each frame A: As far as I know object creation is always expensive. You should avoid th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XCode Instruments Allocations: Look at Live Bytes or Overall Bytes? I am getting some memory warning in my iOS app so I am running Instruments to see the allocations. Should I look at the * All Allocations * Live Bytes or Overall Bytes? Someone said the iOS can close my app if I use for 22MB, is that from the Liv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: jQuery Expanding Navigation with Body classes Every page on my site has multiple body classes that I use CSS selectors with, like so: <body class="category subcategory page"> I would like to be able to automatically add the class 'expanded' to the menu item in the left nav if it matches the final class in that decla...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: writing UI content to a file on a server I've got a pop-up textarea, where the user writes some lengthy comments. I would like to store the content of the textarea to a file on the server on "submit". What is the best way to do it and how? THanks, A: This would be very easy to do. The text could be just a string o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574366", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I delete an unretrievable file from a Perforce repository? In my Perforce repository there's a file that was submitted a while ago and was at one point valid. I need to move the file and its parent directory to a different location in the repository. However, I'm unable to retrieve a copy of the file from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574368", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Intent from Android Notepad example action: android.intent.action.PICK data: content://com.google.provider.NotePad/notes Asks the activity to display a list of the notes under content://com.google.provider.NotePad/notes. The user can then pick a note from the list, and the activity will return the URI for that i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Extracting numeric range "values" from a Ruby Hashtable or JSon object I am quite new to Ruby (1.8.7), and would like to be able to extract values from a Hashtable which are within a specific numeric range (without having to iterate through the values). If I have Hashtable with: my_hash = { 55 => {:value=>61, :ra...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: type wrapper error with boost::mpl::for_each (section 9.1.1 from Abrahams & Gurtovoy book) The following code is copied almost verbatim from section 9.1.1 of the book C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond by David Abrahams & Aleksey Gurtovoy. The only change is that I w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does one omit the closing slash on elements using WTForms? I've been noticing that WTForms (and Flask-WTF) output <input> elements with a closing slash like so: <input name="text" type="text" value="" /> My documents are HTML5 and therefore need no XHTML-type closure. How would I make WTForms output the input t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: String to unique int algorithm We are trying to implement the following case. We have a invoice table and there is a column which has email address. We want to somehow generate a unique int value from this email address and store that in a separate column. This will be used as a FK and indexed. So what I am looking ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Master pages for GAE project (python) I've got a project running on GAE and I am quite sick of manual support of headers and footers in all the page templates I have. Is there any way to use master pages for GAE? A: You can have a _base.htm template with header and footer: <!-- header --> {% block bodycontent %} {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does one change the color for text highlighting in Xcode 4 for warnings and errors? Possible Duplicate: Fix for Xcode's indiscernible highlighting of inline errors? Does anyone know how to change the color of the in-line highlighting for warnings and errors in Xcode 4? With almost every theme, the yellow warn...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: eclipse shiro ini problem Honestly, before posting question did googling and 2 days tried to solve problem on my own... I want to get Apache Shiro working with GAE. Before that, I had success with Spring Security, but here I can't do a simple thing: to get the filter find my shiro.ini ! After introducing ShiroFilter...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: VBA Outlook Script I have a script I've pieced together over time. Recently a plugin we need to use in Outlook has caused some issues. Basically we get prompted twice because when the plugin is used the e-mail ends up being destroyed and re-created with a specific attachment filename. At this point the user is promp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using maven to copy war via ssh I want to copy war file via ssh. I have the following pom: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>wagon-maven-plugin</artifactId> <version>1.0-beta-3</version> <executions> <execution> <id>default-cli</id> <goals> <goa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to align elements inside a tabPanel in Sencha touch I have this simple tabBar inside a TabPanel: MyApp.views.Viewport = Ext.extend(Ext.TabPanel, { fullscreen: true, tabBar: { dock: 'bottom', layout: { type: 'hbox', align: 'stretch' }, }, items: [ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How I do a function C# for i can receive messages from Server Chat in PC and Chat Client in Android device? In my C # application Chat Client I don`t not know how to do a function to receive messages from the Chat Server in C # and presents them in a TextView Chat Client I'm programming in Visual Studio in C # using...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574396", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why 'bundle install' fails in Rails generator? I'm trying to create custom generator for Rails 3.1. And I wrote this: module SomeGem module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc "This adds devise" def install ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: From where can I install Report Application Server? I need RAS installed in my machine in order to create dynamic reports with the RAS SDK in .NET. I don't know how to install it. In which version of Crystal Report Server is it available? A: MSDN suggests RAS is available in Crystal Reports 10 and up. And from anot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Summing values in Sencha List via Grouping and displaying in Group Header list item Could somebody give me a little info on how I might go about adding a summarized value to the header of a grouped list. For example. I have the model {firstname, lastname} and say 10 records. I want to group by lastname, but while...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use of predefined sounds in AudioServicesPlayAlertSound? Is it possible to use predefined sound ids in AudioServicesPlayAlertSound (http://www.iphonedevwiki.net/index.php/AudioServices) or can this cause my app to be rejected?
{ "language": "en", "url": "https://stackoverflow.com/questions/7574406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VBA function returns to calling routine on an assignment statement I have a mid-level function that is called and calls other functions. Inside the function a dynamic arrary is "Dim myarrary() As Variant" is loaded from called function. The arrary "myarrary" is loaded with the proper data. When I attempt to assign...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574408", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using "FindControl" on a base page My page, Default.aspx inherits form BasePage.cs. In the base page I am trying to find the control Label1 that is actually in Default.aspx. var labelControl = (TextBox)Page.FindControl("Label1"); However, this is always coming back as null. Can I find controls of other pages throug...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574409", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I configure an ExtJS 4.0 xmlTreeStore for a treePanel with Designer 1.2? The tutorials for xml treePanels are too simple. I don't know if what I want is even possible. What I want is to see a tree with a root folder called "contenttype" (or simply "root" is acceptable). Inside the root folder is one folder ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: my own interpose function as an exercise I'm resolving a 4Clojure exercise, this exercise asks you to build your own interpose function. My answer follows: (fn my-interpose ([separator input] (my-interpose separator input nil)) ([separator input result] (if (empty? input) (reverse (rest resul...
{ "language": "en", "url": "https://stackoverflow.com/questions/7574416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }