text
stringlengths
8
267k
meta
dict
Q: Calculate Totals for a column of Text Values I have a column of data that contains various string values, (Grade 01, Grade 02, Grade 03, etc...). What I would like to calculate total number of each value. Example: * *Total Grade 01 = *Total Grade 02 = *Total Grade 03 = etc.. How do I go about calculating th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Execute 3 functions that return true/false and if all return true do something or else, no short circuiting I have 3 JS functions a() b() c() I want to execute all 3 and also check if all 3 return true then I want to call function yeah() or else call function boo() I can use && but it will short circuit and may not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Enable hyperlink field in gridview while all other controls are disabled I have to disable all the controls on my gridview for business purposes. Me.gvLineItems.Enabled=False However, I need to enable one hyperlink field enabled so I tried this: For Each Row As GridViewRow In Me.gvLineItems.Rows ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Storing workflows (state machines) in the DB. What's the best way? I am using workflow gem (htts://rubygems.org/gems/workflow), inside a RoR model (User) to model a simple state machine (actually many workflow with the same root). The state machine is hardcoded in the model, but I need a way to allow the administrat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to send POST data with code in an android webview I have an android application that consists of a WebWiew and I need to login to a site automatically using code. I've tried using postUrl() and it seems to work... but only on some sites. Here's the code I'm using: public class webviewActivity extends Activity { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Boolean assignment in Prolog all. I want to assign a boolean value to a variable. I've tried stuff like. Diagonal is (XPiece = XFinal) Diagonal is (XPiece =:= XFinal) Diagonal is (XPiece is XFinal) None work... Any solutions? A: Prolog's built-in predicate is/2 evaluates the right-hand side of the expression as an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: MVC 3 Selectlist/DropDownList Is Not Updating My Model I hope someone can help with this one. I have three Model classes like this: public class Provider { public Guid ProviderId { get; set; } public string Name { get; set; } public Guid LocationId { get; set; } public virtual Location Location { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is a session variable stored by default in a cookie? When I use session variable for a website in PHP, is that information stored in a cookie? Or is it just on the server and it times out? I want to store information about which usergroup and security groups a person is in so I don't have to access the database eac...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Synchronous vs asynchronous ioctl in worker thread In a simple MFC application, I need to have a worker thread that constantly poll an ioctl for an event. At first, I attempted to achieve this using non-overlapped ioctl inside a while loop. The way I figured it is that if the ioctl does not complete io request immed...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586581", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Comparing two Wireshark capture files I want to use iperf to send some packets and receive the same at the client (which might have gone through different OSI layer processings). I want to check the packets sent are same as the received ones. * *Can I use Wireshark to capture the streams? *Is there any way to co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Bash process substitution and exit codes I'd like to turn the following: git status --short && (git status --short | xargs -Istr test -z str) which gets me the desired result of mirroring the output to stdout and doing a zero length check on the result into something closer to: git status --short | tee >(xargs -Ist...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Unix: traverse a directory I need to traverse a directory so starting in one directory and going deeper into difference sub directories. However I also need to be able to have access to each individual file to modify the file. Is there already a command to do this or will I have to write a script? Could someone prov...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert MySQL query into PostgreSQL I have this query: DROP TABLE IF EXISTS tmp_table; CREATE TEMPORARY TABLE tmp_table(id int primary key) IGNORE ( SELECT user2role.userid AS userid FROM user2role INNER JOIN users ON users.id=user2role.userid INNER JOIN role ON role.roleid=user2role.roleid W...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: x and y coordinates for drawing text on (rotated) canvas? I'm trying to drawText on a Canvas using Paint and I can't seem to figure out the proper x and y to give it. If I log the getWidth and getHeight, I can see that the View is actually giving the width and height of the rotated canvas. Thus, its something like 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the 4th factor in 4 factor authentication The Principle for 3-Factor authentication is Something you have (like a smartcard) Something you know (like a pin) Something you are (like a fingerprint) Then what is the 4th factor. Is it like 4D :) A: I don't think 4-factor authentication is a well defined concep...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Use X509Certv3 from string for WCF Service Endpoint? I have exported a key pair (public and private key) into a single cert from a Win2k8 server. I then used OpenSSL to convert it to a pem: openssl pkcs12 -in cert.pfx -out cert.pem -nodes I then put the contents of the .pem in a MSSQL table, Varchar(max) column typ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Scala pattern matching against URLs Is there a Scala library/example that will parse a URL/URI into a case class structure for pattern matching? A: I would suggest to use the facility provided by extractors for regular expressions. For instance: val URL = """(http|ftp)://(.*)\.([a-z]+)""".r def splitURL(url : Stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Weird query: "equal slash id" (=/id) gives weird error: 501 This is the weirdest problem of my life, and can't even Google it. It's happening on an Apache powered website written in PHP, which uses mod_rewrite (but that's not the issue, I tried removing the .htaccess file, problem still exists). If I have a query st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails 3 : Mass-assignment with ActiveAdmin and has_one I am developing a rails application in which I have two models User and Client. User is backed by devise and is responsible for authentication and has_one Client which holds the client details for a given user. This relation is always present as I ensure that a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Random number In C# Possible Duplicate: Random number generator not working the way I had planned (C#) I created a method that returns me a random number: public static int SelectRandomMachine(int max) { int seed = (int)DateTime.Now.Ticks; Random rndNumber = new Random(seed); int randMachine = rndNumber.Next(0, m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Open_basedir restriction oddness I'm having a problem with move_uploaded_file in PHP, with the returned error message telling me that the open_basedir restriction is in place (which I've set) and that on the path I'm attempting to write to is not within the allowed paths, but it is (and is clearly displayed on the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586616", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Line numbers do not appear in stack trace of exceptions thrown from COM+ Applications. Why? The title basically summarizes it. I have a COM+ Server Application implemented using VB.NET 2010, that was configured to gather data from its own .config file by using the procedure described in http://msdn.microsoft.com/en...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to create iphone adhoc release for my client, i have client's apple dev account This is my first app and apple's devel/distro profiles, certs, etc are eating my head for the last day. i could not figure out the requirements of them and how to do this obvious thing. I developed an app for my client. They have a c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: selectOneMenu with primefaces 2.2.1 I have a problem with p:selectOneMenu in primefaces 2.2.1. I want to add a new component "selectoneMenu" into primefaces2.2.1.jar. Any idea please. A: The <p:selectOneMenu> is introduced in PrimeFaces 3.0. It is not present in PrimeFaces 2.2. So you have 2 options: * *Upgrade...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Read a local HTML file with Mechanize I am building a crawler, I know how to use ruby mechanize to read a page from the net using this code: require 'mechanize' agent = Mechanize.new agent.get "http://google.com" But can I use Mechanize to read an HTML file from the file system? How? A: I was unable to get the fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: strip_tags() giving "can't use function return value in write context" when not writing I got the error Can't use function return value in write context when trying to do assignment with empty(strip_tags($string)) as the conditional in a ternary statement. So for testing, I got rid of the assignment and the ternary ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Implementing explicit interface members with generics I have a nongeneric interface to a generic class group. I have a method which uses covariance to return a strongly typed instance in a class derived from an abstract implementation of the non-generic class group. So basically with this setup, I have a number of c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Looking for a good boolean algebra library I'm writing a tool that deals with some boolean algebra. It's basically a tool to create a state machine based on a user-defined file that contains state names, conditions, and transition information. The method by which state transitions occur is to basically look at a boo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586634", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Accessing a NSMutableArray from another class I have a NSMutableArray and I need to access it from another class. This is what I have done so far; * *I declared NSMutableArray *muArr in the .h file, and @property(nonatomic, retain) NSMutableArray *muArr. *@synthasize muArr; in the .m file, and finally populated ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586636", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Horizontal Scroll View Width in Android? How can I set a width for Horizontal Scroll View? myHorizontalScrollView.setWidth(); This doesnt appear to work, I need to limit the scroll views width. A: ViewGroup.LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT ,LayoutParams.FILL_PARENT); myHScrollVie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unexpected result using WebDriver's findelements(By.cssSelector) method in loop I am using WebDriver to verify elements on a page by css selector. With the following method 'checkTablesByHeader' that I have created. public static void checkTablesByHeader(WebDriver driver, String[] columnHeaderValues, String tableID,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586640", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Facebook api not working in subdirectories Trying to plug in the new login api from a test script in a subdirectory of my site, and seeing that when I call getUser() I'm getting back a Facebook user id of 0. When I move the same script into my domain root, I get what I expect - my FB uid. This obviously puts me at a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: MongoDb Norm serialization I know this is subjective, but how good is the norm serializer, particularly related to serialization of complex objects that are cyclic. Essentially I have big chunk of deserialized xml message, coming in over the wire, several hundred times a minute, which has some 47 or 57 classes when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Backbone problem with this object This is my View in Backbone framework: jQuery(document)ready(function() { com.company.View = Backbone.View.extend({ initialize : function() { myCollection.bind('add', this.onSuccess); }, onSuccess : function(model) { // do something this.somethingElse(); }, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to display MSSQL varbinary(3072) image in PHP? I have an bitmap image stored in MSSQL, datatype of the column is varbinary(3072). All I want to do with the image in PHP is to display it + store it into a file. How to do that? Couldn't find anything useful on Google nor here on SO. Only thing I have found is usag...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SSH error? - PTY allocation request failed on channel 0 [OSX 10.7.1 Lion] I've connected to this server many times before so I'm not sure why I'm getting this error. I did a verbose to get some further details it seems as though there's something wrong with my key but I'm really doubtful that's what it is. ~/key $ s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Count items in datasource of gridview (.net) I have a GridView and bind a list to it: List<T> items = T.GetItems(); GridView.DataSource = items.OrderBy(x => x.SomeValue); GridView.DataBind(); Now in the process of databinding, I would like to access the total number of items in the datasource. protected void GridV...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Where do I get the device token that Urban Airship requires for iOS registration? From the online API: An HTTP PUT to /api/device_tokens/ registers a device token on our end. This lets us know that the device token is active, and should happen every time the application is opened to ensure that the list of device t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to ensure that only one XMPPConnection will be created? Use singletons? I'm dealing with creating a web service which will receive requests to send messages via XMPP. However, all messages will be sent from one account (the server logs in and sends notifications to users). Here comes the problem - how to impleme...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: quick-sorts iterator requirements tl;dr: Is it is possible to implement quicksort on a doubly linked list efficiently? My understanding before thinking about it was, no, its not. The other day I had an opportunity to consider the iterator requirements for the basic sorting algorithms. The basic O(N²) ones are fairl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Adjust Text Field Size Based on current language iOS Is it possible to dynamically set the size of a text field, button or other visual atributes based on the current user selected language? Code sample would be great! Thanks for the help A: You can easily adjust the size of a text field, for example depending on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586679", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Create non English directories in PHP I want to be able to create folders for the registered users under their names. Their info is stored in my db in Cyrillic characters and pulled from their when creating the folder. The thing is if the info is in English everything is ok, if in Cyrillic I get something like РљСѓ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Add selectors to multiple segmented controls in NIB file I have two UIbuttons, and I want to assign the two buttons to a UITextView so that when one of the buttons is pressed, the text view content changes from what it had when previous button was pressed. I want to do this using a segmented control. How do I assign...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MySQL Double Order Is there a better way to write SELECT users.id FROM `users`,`profiles` WHERE users.id = profiles.id && profiles.zipcode = '$zipcode' && users.id != '1' && users.id != '2' && profiles.picture != '' ORDER BY users.last_activity DESC LIMIT 0,11 (The code above is suppose to find all the users with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is 2d array a double pointer? int main() { matrix[2][4] = {{11,22,33,99},{44,55,66,110}}; int **ptr = (int**)matrix; printf("%d%d",**matrix,*ptr); } But when a 2-d array is passed as a parameter it is typecasted into (*matrix)[2] .. what type does the compiler store this array as... is it storing as a 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Add paperclip new style doesn't affect old uploaded images I have Company model with logo image has_attached_file :logo I have created many companies with their logos. Now, I need to add new style has_attached_file :logo, :styles => { :small => "30x15>", :medium => "155x85>" } Should I re-upload all my old data to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: PhoneGap Sencha Blackberry I'm having a hard time creating a project that allows me to run sencha touch on a blackberry using phonegap I can run a phonegap example, I can run sencha touch in IOS and a webbrowser but I can't figure out how to link everything together. I'm using ant and I'm completely new to it I have...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Exclude advertisements from social sharing thumbnail options Awhile back I noticed that social linking sites such as Reddit, StumbleUpon and Facebook would often grab advertisements running on my site as the thumbnail image for shared pages. I didn't want that to happen, obviously, so I added a default image link to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: c# profiling aspx page loadtime I would like to profile the loading of an aspx page to determine the bottlenecks, without using an outside tool. How can I do this? Thanks. A: Page Tracing might give you a start but this doesn't give you memory usage etc, only timings. A: ANTS Memory Pro filer is the best tool I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a "startswith" method in pyparsing Hey I have written a very simple parser with pyparsing which detects some tokens in a text and then replaces them with a different string. The problem is that right now my code only works with exact matches. What I'd like to do is detect partial matches too. For example if...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Verify web service is available I have a C++ program that will be retrieving a url which specifies a wsdl. My program is simply middleware and doesn't perform any wsdl related requests; it will literally read the data and pass it on to whomever will use the url. That being said, within Linux, can I test to see if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Facebook PHP SDK clear session data? I want people to be able to remove my app from their facebook-account from my app. This is easily done with: $fb->api('/'.$fbUid.'/permissions','DELETE'); The problem is that if the user loads another page on my website the facebook php sdk still seem to think that the user is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using PHP, how do I trigger something once every 100 visits? Thanks for reading my question, here is what I'm trying to achieve: * *I have a PHP web page that people visit. *I want to trigger a job that does something approximately every 100 visits(on average) to my PHP page. The frequency does not have to be ex...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Where can I find WSDLs in Websphere web console interface Yep, that's the question. I didn't manage to find web service endpoints in websphere console. But I'm pretty sure they must be there, please help. A: For JAX-WS services you can find it in two places: * *Applications > WebSphere enterprise applications > ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586732", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: tsql query - select records from 2 tables without joining them I have 2 table as follows: emp_id emp_name emp_add emp_no dept_name 1 sss hhh 0 hhh 2 wsss ddd 0 hhh 2nd table is as follows: dep_name dept_no hhh 1 I have select records only from table 1 where dept_name...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: How to catch interrupts generated by TimeConstrained? Mathematica has the CheckAbort function which allows to catch and handle user-generated and programmatic Aborts. But it does not allow to catch interrupts generated by such functions as TimeConstrained and MemoryConstrained: TimeConstrained[CheckAbort[Pause[100],...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: app does not load engine's assets via sprockets I am trying to rewrite an app using rails 3.1 making use of engines. Somehow the test dummy app does not pick up my assets and I don't know what would be causing this. i.e. stylesheets from the engine are are not included, same for javascript, and probably every thing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Organized library with Fortran functions I am trying to make a library of useful functions. I yet don't know much about this, but apparently most of them, if not all, need to be included in a module (or in a interface inside the program, but since the point of this is to make a library, that doesn't seem to be a cho...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Usercontrol blendability wp7 Hi I'd like to make a simply user control <UserControl x:Class="TestDependencyProps.controls.TestControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Limiting concurrency and rate for Python threads Given a number threads I want to limit the rate of calls to the worker function to a rate of say one per second. My idea was to keep track of the last time a call was made across all threads and compare this to the current time in each thread. Then if current_time - l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Getting an image url from sql database using php I'm trying to retrieve an image url from a database called flags in the image field to use. Where am I going wrong with this? <?php connect(); $sql = ("SELECT image FROM members, flags WHERE members.member_id = '$_SESSION[id]' AND flags.id = members.country");...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can I overload an array subscript operator in PHP? I have a class with an internal array, and I'd like to overload the subscript operator to access the internal array and provide debug/logging actions. Is there any possible way to overload the [] operator in PHP, or is there another option I should be chasing in thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: gcc Atomic Operations Causing SEGV I've been using a gcc atomic operation for quite a while in a multi-threaded application, and yesterday, ran into an interesting scenario that I cannot explain. These atomic functions are overloaded and can use datatypes that are 1, 2, 4, or 8-bytes wide. In particular, I use the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: transpose an image in cuda I am having a problem of transposing an image: I call the kernel method: // index of the pixel on the image int index_in = index_x + index_y * width; int index_out = index_x + index_y*height; // Allocate the shared memory __shared__ unsigned int onchip_storage[16]...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586751", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating a table/grid with a frozen column and frozen headers I am working on a small Android app. Part of what I need for this android app is to have a grid that is both horizontally and vertically scroll-able. However, the leftmost column needs to be frozen (always on screen, and not part of the horizontal scrolli...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Draggable and offset coordinates I've been trying to get the final offset coord for a draggable box but it doesn't show both the final x and the final xmax and same for the y axis.i've debugged it and it shows that the problem arises from putting in the variable finalxmPos and appending the text in the list with id ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delete rule for one-to-one relationship I have 2 entities: Department <---->> Employee. So, the department has a one-to-many relationship with employee, and employee has a one-to-one relationship with department. What should be the delete rule of the one-to-one relationship? If I choose cascade, I can see that the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can i share an Xcode 4 project with multiple developers using Subversion We are multiple developers working on the same Xcode 4 iOS project. We are trying to commit to use Subversion but we keep getting conflicts with project.pbxproj when 2 developers add a new target or change the project structure. What is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails 3 routing error in a relationship in a has_many => through association I have my models setup as follows: class User has_many :memberships, :dependent => :destroy has_many :groups, :through => :memberships Class Group has_many :memberships, :dependent => :destroy has_many :users, :through => :membershi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Mongoose - Form to save model with embedded documents Having trouble saving an embedded array to a Mongoose model. Please see Edit at bottom. I have a form to create BlogPost in Express using Mongoose to store data in mongo. I can create and view new blogposts however I just added an embedded document schema Feed in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to fix the StrongNameKeyPair error in .Net for using Moq? As far as I can see, it is necessary to have access to write in the machine key store. So how do I assign this permission to a user? I need to ask support people to grant a user the necessary permissions to run Moq, but I don't know what exactly to ask fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Named elements in a FlowDocument from a ResourceDictionary I have a FlowDocument (a template for a report I need to produce) stored as a resource. This seems to work well but if I name the elements I can't get a reference to them with FindName(). Here is the resource dictionary: <ResourceDictionary xmlns="http://sch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: On shutdown, MAMP sometimes asks me for username and password, but not always When I log onto my Mac OSX admin account, I have MAMP automatically start so I can get right to managing my server content. But every now and then, when I shut down my computer, the MAMP window opens up and asks for my admin name and passw...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Socket Connect to 8443 ok but not 443? I'm doing a little bit of socket programming on android (note I said socket, not HttpClient or HttpUrlConnection) and I'm running into a very strange issue where I cannot make a connection to my tomcat server on port 443 but 8443 is fine. My code is very simple, this is all the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the regex to return the following I need the regex that returns the following from a webpage's code, I'm searching whithin Dreamweaver in the code of the page: <body> **** lines of HTML code (anything)*** <div class="pg"> sorry I'm into a situation that only regex is the solution, i'm so new to it. A: You c...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586783", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Could not find devise-1.4.6 in any of the sources I have installed devise 1.4.6 succesfully on my local development environment. I have this in my bundle file: gem 'devise' But when I want to deploy it to heroku, it says "Could not find devise-1.4.6 in any of the sources". What should I do? Thanks! A: Add the follo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: perl: can I wait 15 minutes, and then if a key has not been pressed, do something? here's my first ever perl program: I want to make sure that if I'm away from my machine for a while, then this script ssh's to our main server and kills all my processes there. (I keep forgetting to kill them when I go for lunch and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: App Engine Java Unit Test Environment Setup we use the appengine-web.xml file to store global config data as system properties (like the location of various development servers we need to communicate with). These properties are not available when running unit test with the LocalServiceTestHelper class. There seem t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: multi vs single instance business application (This topic is so general there has to be an existing thread somewhere, but darned if I can find it. I did find several debates on the best way to enforce single instance apps.) I've got an inhouse business app coded in .Net 3.5. I use ClickOnce to publish and the back...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Copy Ant path to WAR's lib directory I think this is probably a common use case. I define a set of paths: <path id="log4j.classpath"> <fileset dir="${log4j.home}"> <include name="log4j-1.2.16.jar"/> </fileset> </path> <path id="junit.classpath"> <fileset dir="${junit.home}"> <include name...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Passing clicked hyperlink text in query string I am using Visual Studio 2005 Professional Edition. I have a Crystal Report on which one column contains hyperlink values coming from a stored procedure. When the user clicks on any of these hyperlink values, a next page [here, ReportAllBlocks.aspx] should open but I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Set a ResourceDictionary DataContext from code behind I'm trying to set a ResourceDictionary DataContext, from the code behind of my Resource Dictionary. I have a Data Template that uses its own style (the Resource Dictionary), the style contains a checkbox with its own style : <Style x:Key="CheckBoxStyle" TargetTyp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Fake an active record model without db I feel like I've got to me missing something. I'm writing a ruby gem that allows interaction with active record as an add on to its primary function. In writing test cases for it, I need to be able to specify dummy active record models to test this functionality. It would be s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to retrieve data from child table using CursorLoader which loads data from main table? My app is using CursorLoader to load data from main table. The data will be displayed in ListView with the help of CursorAdapter. The view displayed in ListView also requires data from child table. The relationship of the tabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: moving pointer between vectors in vector causes vector iterators incompatible I have std::vector of cells. Each cell has other std::vector to store some pointers to entities. Now I want to move pointer from one cell to another based on calculation new cell index. But I am getting vector iterators incompatible. I kno...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Datatype/structure to store timezone offset in MySQL Which would be the proper datatype/structure to store timezone offsets in MySQL? I just want to store the numeric value (the city and country are obviously stored in other columns). Examples: * *-5:00 Guayaquil, ECU *-4:30 Caracas, VEN *0:00 Some city *2:00 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Starting with BDD (using Behat and Symfony2 as background) I'm just starting with BDD and this instructions about Behat but I'm missing an example a bit more complex, Product-Category example is too simple (but necessary at first of course..) when you want to go beyond.. I'm working with models that doesn't have a u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: I'd like to develop for the Kindle Fire, but it won't be released until November. What should I use for a dev device in the meantime? I haven't developed for Android before, but I hear the emulator is so slow as to be almost unusable, so I want to know which tablet to buy. Getting a device with the same screen resol...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: rails2 memcache expires_in problem I have a strange problem with a Rails 2.3.4 application. The expires_in time is set to 10 seconds after each hour. But memcache seems to remember the value even after a cache flush. caches_action :deals, :expires_in => (3600 - Time.now.to_i % 3600) + 10, :cache_path => Proc.new {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using OpenGL shaders to plot 4D points in 2D in C++ Possible Duplicate: Visualising 4D objects in OpenGL I have a set of 4 dimensional data points (lets call the dimensions X,Y,A, and B) that I'd like to plot in 6 different 2d plots (plot XxY, XxA, XxB, YxA, etc...). In a previous question I asked about the prop...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: devise registration confirmation freezes when I click email confirm link I'm getting some strange behavior when testing on my local machine: 1) First of all when I sign-up, I'm redirected to the home page and I see a flash message that says: "You have signed up successfully. However, we could not sign you in becaus...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Placement new breaks consts and references? Following the discussion on my answer to this question, apparently: the following code is allowed struct Foo { int x; }; Foo f; Foo & f_ref = f; (&f) -> ~Foo (); new (&f) Foo (); int x = f_ref .x; but the following code is not allowed struct Foo { const int & x...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: JAXB don't generate attribute from java class I have a class like the following: @XmlRootElement(name = "task") class Task{ @XmlElement(name = "id") Integer id; @XmlElement(name = "name") String name; String bzId; } I want to generate an xml like the following: <task> <id>1</id> <name>String</name> </...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do i run a UNIX terminal from Java and send commands to it? Regarding the topic, the code below Process proc = null; try { String[] cmdss= {"gnome-terminal"}; proc = Runtime.getRuntime().exec(cmdss, null, wd); } catch (IOException e) { e.printStackTrace(); } Runs the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586858", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to specify a unicode character using QString? How can I specify a unicode character by code (such as "4FF0") using QString? I tried QString s("\u4FF0"); but it only outputs a question mark. Any idea how to do this? Edit: It works that way, but is there a more direct way? std::wstring str = L"\u4FF07"; QString s ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586860", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: $_SERVER not returning query string I'm simply trying to store the current page a user is viewing in a DB. When the page loads, I insert $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'] into my DB, but only the page (e.g. index.php?) is showing up, without the query string (I have verified that there IS a query st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586863", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: phpcassa usual query methods or cql queries? Can you recommend what methods of queries to choose?Cql or usual classes? Phpcassa has both methods.cql is more comfortable than usual.but what will be efficiently? A: So far, the evidence is that CQL is as fast or faster than the older RPC-based API. (See comments on h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java multiplayer game - networking concepts For a school project, we're supposed to create a multiplayer game in Java (it should be client/server) which can be played over the internet (we're programming this at school, so it's not homework). The game is turn-based, but there should be a chat, which ofcourse is real...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: In JavaScript, what is the advantage of !function(){}() over (function () {})()? Possible Duplicate: What does the exclamation mark do before the function? I've long used the following for self-executing, anonymous functions in JavaScript: (function () { /* magic happens */ })() Lately, I've started seeing more ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Why does the Eclipse Java compiler check casts from null? Consider the following Java snippet: public class Test { public static void use(Object[] x) { } public static void main(String[] args) { Object[] x = null; use(x); } } The Java bytecode produced for main() by the Eclipse 3.7...
{ "language": "en", "url": "https://stackoverflow.com/questions/7586872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }