text
stringlengths
8
267k
meta
dict
Q: XSLT transforming is throwing error I've xml as below, <?xml version="1.0" encoding="utf-16" ?> <AllResidentAndUnitInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="ResidentsByUnitInfo" xmlns="http://schemas.datacontract.org/2004/07/FSRSchema"> <BillingAddresses> <BillingAddress> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to write tuple range function in scala? I want following function range((1,1), (2,2)) which return Seq[(Int,Int)]((1,1),(1,2),(2,1),(2,2)) It is analog for one dimensional range with 1 to 2 The function should work for any scala tuple (i.e. Tuple2, Tuple3, Tuple4, ...) and be typesafe. I've tried with def ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: add class to if href starts with http://www.twitter.com/ Possible Duplicate: jQuery: Select <a> which href contains some string I am working on a little twitter implementation for a website. The javascript I use exports the code as following: <ul> <li>twitter message here <a href="http://twitter.com/username/ID...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: mySQL fulltext learning I am creating an online FAQ type system using php and mySQL. The following SQL is what is used to find relevant questions based on what the user entered as $term. When a user searches for something and clicks on a relevant question to display the answer they get the chance to rate the ques...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Delphi XE2 FireMonkey and ssl does anyone know how to use ssl with Indy and get it to run under windowns and osX? I've seen the link below so TIdHttp appears to work but I need the ssl options. Firemonkey and TDownloadUrl Thanks A: If you are using the Indy components that came with XE2, then you can drop in the W...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Drawables are always read from mdpi folder, regardless of screen size I am trying to create an application that works both on Samsung galaxy tab GT P1000 and samsung galaxy tab 10.1; The samsung galaxy tab 10.1 (1280 * 800) has a much bigger screen than that of the GT P1000, so I am assuming the GT P1000 should read...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Permission denied while reading the db file I need to read a db file from a different application. The db file is created by the specific provider app & my application has to read this db file and take a back up. Not able to access the file : Permission Denied. Is it possible to read the file created by a different ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to disable unlocking screen programmatically * *I need to lock the Android phone when the user leaves a defined WiFi area *I need to prevent the user from unlocking the phone when he/she is out side the defined WiFi area *I need to unlock the phone when user is back to the WiFi area I guess list items 1 an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Segmentation Fault while reading specificly 13 lines char **getLines(FILE *pFile) { int nLines = 0; size_t memRes = 0; char **lines = malloc(memRes); char *current = (char*) malloc(20); while(fgets(current, 20, pFile) != NULL) { memRes += sizeof(char*); lines = realloc(lines, memRes); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting JSONObject from JSONArray I am in a bit of a fix regarding the JSONObject that I am getting as a response from the server. jsonObj = new JSONObject(resultString); JSONObject sync_reponse = jsonObj.getJSONObject("syncresponse"); String synckey_string = sync_reponse.getString("synckey")...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "47" }
Q: Facebook Graph API Batch Requests - Retrieve Friends Likes returns unknown error I'm accessing the Graph API using batch requests, while trying to retrieve all of my friends likes the plataform returns-me a unknow error. By the way i'm using JSONPath to retrieve the likes. likes?ids={result=friends:$.data.*.id} Is t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: RJS Handler missing I got a missing template error when I tried to achieve a task using RJS. All I want is to execute an RJS file on ajax call. But I am getting the following error. ActionView::MissingTemplate (Missing template line_items/create, application/create with {:handlers=>[:erb, :builder, :coffee], :format...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to call C .exe file from C#? I have an .exe file which was written in C. It is a command line application. I want give command line and also get correspond output in this application through a C# application. How do I invoke the command and get the output from C#? A: You could use the Process.Start method: clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Split line with perl I have a multiline credits with missing a few commas: rendező: Joe Carnahan forgatókönyvíró: Brian Bloom, Michael Brandt, Skip Woods zeneszerző: Alan Silvestri operatőr: Mauro Fiore producer: Stephen J. Cannell, Jules Daly, Ridley Scott szereplő(k): Liam Neeson (John 'Hannibal' Smith ezredes) Br...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Backbone.js detecting scroll event I have a following view var FullWindow = Backbone.View.extend({ initialize: function() { _.bindAll(this, 'detect_scroll'); }, // bind the events events : { "scroll" : "detect_scroll" }, detect_scroll: function() { console.log('detected'); } }); and I in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to Hide an Image, if not clicked, in N seconds? I have a button that when is clicked, an image is created using javascript and get prepended to a div (adds it inside a div). var image = new Image(); var imageHtml = image.toHtml(); $('div.board').prepend(imageHtml); function Image() { this.toHtml = function ()...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Session, cookies and Security I got a problem. I have a web app,where I do the following: 1)Login 2)later extract the cookie 3)Logout 4)Insert manually the cookie and when I visit some page again, I'm logged. How can I fix it? I want the cookie expiration. thanks for your response. A: I suggest you use the built-in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Complex query across multiple tables I'm simplifying my actual case to get the point across quicker, just as a heads up if this seems nonsensical. I have a table called Candy_Central. Candy_Central has all of the ids for my candy, the price per pound as well and a couple other significant pieces of information that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: issue while getting values from Dictionary> I am having a dictionary which was defined as follows Dictionary<int, List<int>> dict1 = new Dictionary<int, List<int>>(); I will have a list element where i can store the values which will come from database List<int> lstdbTaskID = new List<int>(); assume this holds 100...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634535", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rotating ImageView in Android < API Level 11 So in API Level 11 Google introduced the ability to rotate an ImageView (Yay, after they introduced the possibility to Animate such a rotation, yay smart thinking, yay!) But how should I go about to rotate an ImageView using e.g. API level 8? I can't use setRotation() as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: how to get data from xml object in org.jdom.Document? I am trying to get some datas from xml document object. My imaginery xml file is like that; <root> <body> <oids> <oid> </oid> <oid> </oid> <oid> </oid> <oid> </oid> </oids> </body> </root> And to do that I am writing a functi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the outp() counterpart in gcc compiler? In my School my project is to make a simple program that controls the LED lights my professor said that outp() is in the conio.h, and I know that conio.h is not a standard one. example of outp() //assume that port to be used is 0x378 outp(0x378,1); //making the first L...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sharing session via web request I have spend a lot of time on this problem without any change : I have got 2 simples apsx page, in the first page the Page_Load event put data in the session ; later the on_click event of a button fire an HttpWebRequest to the second page with the idea to retrieve on the page_load of...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Registering the google api key for publishing app When we are ready to publish your application,we must get a Maps API Key that is based on the certificate that be will used to sign the application for release n then change the Maps API Key strings referenced by all of MapView elements, so that they reference the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: GetType used in PowerShell, difference between variables What is the difference between variables $a and $b? $a = (Get-Date).DayOfWeek $b = Get-Date | Select-Object DayOfWeek I tried to check $a.GetType $b.GetType MemberType : Method OverloadDefinitions : {type GetType()} TypeNameOfValue : System.Mana...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "110" }
Q: What's an "auto-casting bool"? On the following answer to a previous question someone mentioned an "auto-casting bool" I guess null has an auto-casting bool that is false. What is it, and what does the code that makes it look like? A: The phrase "auto-casting bool" is a poor phrase someone used off hand. I believe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634584", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Date Error in vb.net This one has both me and my boss tearing our hair out in frustration: I'm running a stored procedure to get some information out of my database. One of the values it returns is a date field. When I manually exec the stored procedure in SQL, I get a value and yet when I write the data out onto th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Reading Facebook wall returns an empty array I am trying to read a user's wall, not news feeds, with PHP, and I always get an empty array from this: $api_call = array( 'access_token'=>$facebook->getAccessToken() ); try{ $wall= $facebook->api("$uid/feed/","get",$api_call); } catch (Exception $e){} Any idea ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Cocoa/OSX - NSTextField not responding to click for text editing to begin when titlebar is hidden I have a NSTextField in my window (added with IB) with a hidden title bar but when I click on it when the app is running, it does not respond or place a cursor in its field. Is there anything I am doing wrong? it is set...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: EventLog not working in blackberry I am working on Blackberry simulator with no real device. I have opened the EventLog by tools -> Show Event Log. But it is coming blank with no log details. for sd card I gave path of my simulator.dmp path. I have also tried pressing alt key and then write LGLG. But nothing is hap...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How Can I Code A Category / Sub Category Database Query (One Level Deep) In Codeigniter? Ah, the aged old question of parent / child categories in PHP. My apologies if this question has been asked already (I know it has in many forms), but doing a search couldn't specifically answer how to do this using one query an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634591", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How Edit Image view in android I have Image View I want to show the Current time and date on each Image View. I don't know how to edit the Image view in android. A: Hope this trick will help: Take a textview and add your image as it's background and set it's text to current date and time whatever you want. :) Yes y...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634592", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I use toString and vector between two classes in C++? Possible Duplicate: Is this possible in C++? toString(ClassName* class) I'm trying to use toString but I have a problem in there. I ask this question second time, because the first time I asked before had insufficient information. I just worried about ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ORA-00907 when dynamically creating a view in PL/SQL and using a CLOB This is one of those situations where you get an unhelpful error message back from Oracle. My situation is as follows: I'm dynamically creating a view in PL/SQL. I build a string and use EXECUTE IMMEDIATE to create the view. The string is so long...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Web Deploy API (deploy .zip package) Clarification I'm using the web deploy API to deploy a web package (.zip file, created by MSDeploy.exe) to programmatically roll the package out to a server (we need to do some other things before we release the package which is why we're not doing it all in one go using MSDeploy...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: To print a page of web page I want to print the page content in the printer. I use the following code to write the content to printer: <?php $printer = "\\\\Pserver.php.net\\printername"; if($ph = printer_open($printer)) { // Get file contents $fh = fopen("filename.ext", "rb"); $content = fread($fh, filesiz...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: asp.net forms authentication showing same LastActivityDate for all users I'm not sure why this is happening, but the last activity date for all my users is showing the same. I thought it was the way I was pulling the data from the database, but I checked my data, and it shows the same for all users. Is there somet...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Jena TDB in Python? Is it possible to run a Jena TDB database from a Python app to store a large amount of RDF data? What would be a native alternative in Python? A: An alternative is to use a SPARQL endpoint such as Apache Jena's Fuseki and just use an HTTP client from Python or any other language. To read more a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to integrate XMPP framework for iPhone? Possible Duplicate: How to implement XMPP protocol in objective-C? I am a new developer for Xcode, I don't know how to use XMPP Framework to develop chat application for iPhone. So, please can help me for creating chat appication using XMPP? Also provide some example, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I extract an exact word from text by using python? I want to calculate how many lines contain a word matched with keywords I chosen. So I coded like this. 28 for each_keyword in keywords: 29 if each_keyword in text: 31 related_tweet_count += 1 32 pri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to access "textChanged" event from text box that added to telerik Rad Grid? Hi There Do you know how to access textboxes textChanged event added to a radgrid that are bound but are used to trap any row related input a user typed in to the textbox for that column. I need to access this data server side when a pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hibernate throws SQLException Could not reset reader java.sql.SQLException: could not reset reader at org.hibernate.lob.ClobImpl.getCharacterStream(ClobImpl.java:100) at org.hibernate.type.ClobType.set(ClobType.java:70) at org.hibernate.type.ClobType.nullSafeSet(ClobType.java:141) at ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Rectangle used in ZXING Library for scanning QR code is not centerd I have requirement in which I need to scan the QR code using ZXING library in Android application. I have added complete ZXING code in my project and written following code for opening camera for QR code scanning. Intent intent = new Intent("com.g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there an embeddable FLV player with external audio support? I'm looking for an embeddable FLV player that lets me specify a custom audio track that overrides (i.e. mutes and players over) the existing audio (if any) in the FLV file. I don't want to do any re-encoding - I simply want to specify a playlist of video...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google Maps V3 panTo offset I am having the same issue as this folk ( link ), trying to offset panTo coordinates. The only solution I've found so far is to use panBy after I've used panTo. map.panTo( position ); map.panBy(120, -70); Those familiar with the Google Maps API will know that the issue with this approach...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Order of derived classes in the console my last problem is with inheritance in C#. I thought I understood this topic but somehow I am missing the point why the output is like that. Here are my classes: BaseClass: public abstract class Vehicle { public Vehicle() { Console.WriteLine("Honda Civic"); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634660", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Writing rules in Fortify Does anybody know how to write a rule in HP Fortify SCA to check for an XML tag value in an XLM file? I have an XML like this with a regular expression and want to write a rule which checks whether the element matches a regex. <xml> <email>[a-z]@.com]</email> </xml> A: This is done with a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: remove a set of characters from a script How to remove <p> and </p> from a text in javascript? I have a string <p> This is a text</p> and I want to remove the <p> and the </p>. How can I do that in Javascript? A: Use the replace() function. For example: "<p> This is a text</p>".replace(/<\/?p>/g,"").
{ "language": "en", "url": "https://stackoverflow.com/questions/7634664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google maps tiles doesn't load I'm developing a simple Google Maps app for Android. I'm using Eclipse and an Android Virtual Device. When running the app, no tiles are shown, and I get the message "Couldn't get connection factory client". I've read and looks like it is a bug, but some people say they got their apps ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Unit tests on the UI in MVC3 I have an MVC project and lots of TDD unit tests for testing the passing of data which all work fine. However, I am now going to add some tests for the GUI. How would I go about testing something such as the below: If home/page1, pressing "next" submit should goto "/Page2". I still dont ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Horizontal Scrollbar does not work in winforms user control I've created an user control and added it to a form and enabled Auto Scroll property (True). When I resize the form, this user control horizontal scrollbar still remains the same width and does not change its length, due to which I am not able to see the u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Post a comment against a url If you add a facebook plugin in your site and comment on it, that comments are stored against a url(i.e. your site url) and you can retrieve all those comments by using graph api like below : https://graph.facebook.com/comments/?ids=< URL >. Here is my question : how to post a comment us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to use some C source code in iPhone project? I found a speech synthesizer that supports many languages (http://espeak.sourceforge.net/index.html). But the source code that is available is written in C. What can i do to make it work on iPhone? A: Objective-C is a strict super set of C. Which means yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634680", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to resolve the confliction between "I'm currently working on a Spring MVC project and have some issue with using "<MVC:resource "tag of SpringMVC to load static resource. So I downloaded the springMVC showcase project and did some change on it to check this tag. Since my project is a simple one, seems to me the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Paypal Vs Worldpay we are using Paypal Pro's Hosted solution for payments and finding that a lot of orders aren't completed when customers go to the payment page (one customer complained that they could only select Australia and United States for the shipping country!), we've found a lot of inconsistency with Paypal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In the Ruby programming language, what is the name of $: I want to know more about $: but I don't how is called. :015 > $: => ["/Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1", "/Users/Nerian/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/x86_64-darwin11.1.0", "/Users/Nerian/.rvm/rubies/r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: python: adding to a dict gives error playlist = {} playlist.update(position, title) here position and title are two strings. I am getting the following error: TypeError: update expected at most 1 arguments, got 2 could some please help? thanks A: You can only update a dict with another dictionnary (you could als...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634688", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Get elements width and height How can i get height and width of element which doesn't a part of DOM yet? For example: var t = $('<div style="position:absolute;height:100px;width:100px;background-color:steelblue;" >lalala</div>'); var height = t.height(); // height is 0! A: Works for me as well. You could try var...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: QT Ruby bindings signal-slot with hash param Im using qtbindings for Ruby (https://github.com/ryanmelt/qtbindings) and i would emit a signal with an hash param... Something like this: require 'Qt' class Foo < Qt::Object signals 'my_signal(Hash)' slots 'my_slot(Hash)' def initialize(parent = nil) super(p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Declare variable of composite type in PostgreSQL using %TYPE Question: How can I declare a variable of the same type a parameter in a stored function? The simple answer is use %TYPE, this works: CREATE OR REPLACE FUNCTION test_function_1(param1 text) RETURNS integer AS $BODY$ DECLARE myVariable param1%TYPE; B...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634704", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using Mongoid tree for many to many relationships in rails? I just wanted to seek some advice on database design with mongoid and rails. If I have complex objects that need the ability to reference each other, would this be an appropriate solution. class Tree include Mongoid::Document include Mongoid::Tree end ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverlight page with multiple page names in google analytics I'm using Google Analytics to track traffic on my Silverlight page. The same pages in my app are showing up under different names in the top content page. For example, I have /Home with the most pageviews, then /ClientBin/???.xap/Home with fewer pageviews...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Preference ringtone default value I have this in my preferences.xml <RingtonePreference android:key="ringtone_uri" android:title="@string/preferences_select_ringtone" android:showDefault="true" android:srinlent="true" android:summary="@string/preferences_select_ringtone_su...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Assembly resource missing exception with MonoTouch I'm facing an assembly resource missing exception with MonoTouch. I don't know what to do. The context: I've ported some existing code from SL to WP7 and MonoTouch. Internationalization is performed via satellite assemblies. Resources XYZ.Designer.cs is generated us...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634712", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python decoding Unicode is not supported I am having a problem with my encoding in Python. I have tried different methods but I can't seem to find the best way to encode my output to UTF-8. This is what I am trying to do: result = unicode(google.searchGoogle(param), "utf-8").encode("utf-8") searchGoogle returns the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: Convert JSON empty array to empty string I have some JSON that looks like this: { "ST": "Security", "C1": "Login failures", "C2": "1", "C3": {}, "P1": "2", "P2": "administrator", "P3": {}, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: xsl-fo: fop hangs up using table-header I'm trying to generate PDF using Apache FOP Version 0.94. I want to use table-header in my pattern, but when I apply it fop hangs up without any messages. When I paste code in table-body everything works fine. <?xml version="1.0" encoding="utf-8"?> <x:stylesheet version="...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Google chrome does not start when running through Twist with Seleniumn Where i work uses Throughworks Twist 2.2 with Selenium for testing automation. For some odd reason on my particular machine the chrome driver starts but does not load chrome. The console reports no errors and i have no feedback on which to progr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Replace a substring in C# I have the following string, "Last Run: 2011-10-03 13:58:54 (7m 30s ago) [status]" and I would like to replace "7m 30s" (it is not a fixed string) with another string I have generated. How can I do that with string manipulation in C#? A: string str = "Last Run : (3m 4s ago) [status]"; st...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to update Line series Chart with data consistently? I have a simple line series chart using WPFToolKit. I would like to have new data coming in to be updated on the chart every 5 minutes. But I have no idea how to go about it. The way I am showing data now is this. public Window1() { InitializeCo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Play Scala Anorm "Magic[Country]().using("Countries")" In looking at the docs for Play Scala Anorm, they show specifying a alternate table name as using this syntax: object Country extends Magic[Country]().using("Countries") When i try to use this i get: Error raised is : ';' expected but '.' found. What is the co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rankings in Azure Table I am just stuck in a design problem. I want to assign ranks to user records in a table. They do some action on the site and given a rank on basis of leader board. And the select I want on them could be on Top 10, User's position, Top 10 logged in today etc. I just can not find a way to store ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: protected inheritance error #include<iostream> using namespace std; class base { protected: int a; public: base(int i) { a=i; } }; class derived :protected base { public: derived(){} void show() { cout<<a; } }; int main() { base obj(2); derived obj1; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Asp.Net Website project with 'add view' tooling There are many posts on this, most of which suggest adding the MVC project type GUID to the .*proj file. THe website project model doesn't have a project file though, so is there some way to get support for the add view dialog and tooling with a hybrid website / MVC pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android sectioned listview with complex view I want to use Jeff S. example for sectioned listview with headers. But I want to use more complex item view. Can you suggest me which approach is best to do this. I found two ways * *Put information in Map<String,String> item = new HashMap<String,String>(); using i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ASP.NET - JSON casting var a = JSON.Deserialize<object>(e.ExtraParams["address"]); The JSON [{"id":"","country":"MYcOUNTRY","city":"citycitycity","street":"street","block":"house","building":"building","additionalInfo":"fdsfdsfdsfds","latitude":"32.9206000","longitude":"35.1003000"}] and the class for storing info...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to restore and store two String values? I have two values how can i store and restore it. public void SetCaseInfo(String PatientType, String Teethsselected) { // All objects are from android.context.Context SharedPreferences settings = getSharedPreferences(DEALSPOTR_PREFS, 0); SharedPreferences.Editor ed...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Time (CLR Timespan) column using EF4.1 Code-First approach and SqlCe 4.0 I'be been trying to map a Timespan property to a SqlCe 4.0 database using EntityFramework 4.1 Code-First approach, and of course I'm getting a NotSupportedException saying there's no store corresponding EDM type 'Time' and CLR type 'Timespan'. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Embedding your site's functionality into anothers with Rails 3 (XSS vs iframes) We are looking to integrate the display of some of our models, as well as a payment process, with some of our client's websites. It seems that everybody is going the Iframe route, but this also looks to be rather outdated when compared t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Calulating date difference in minutes by using HQL/SQL query I have a field of time Timestamp in my MySQL database which is mapped to a date datatype in my Bean. Now I want a query by which I can fetch all records in the database for which the difference between the current timestamp and the one stored in the databa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Registering a Firebreath .dll from local hard drive in Firefox How can I register a Firebreath .dll file thats deployed locally on a users hard drive. In IE, I can use ShellExecute in JavaScript to run a shell command to register the .dll How can I do the same for an NPAPI browser ? Thanks ! A: You can't register a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SaveChanges() doesn't work (Entity Framework, C#, Windows Forms) I have a very weird problem. I try to submit changes to the database (using Entity Framework) like this: private ProfEntities pe = new ProfEntities(); //... var row = pe.Irregular_Veebs.Single(e => e.id == id); //selecting one row by id row.seen = true...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In DDD where to keep custom exceptions (application exceptions)? In Infrastructure layer? I'm building a app with following architecture: UI - Application - Domain - Infrastructure I have a Application Layer that need use custom exceptions. Where I keep these custom exceptions? In Infrastructure layer? The problem i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Cocoa/OSX - NSWindow standardWindowButton behaving strangely once copied and added again In my app I change the position of the standardWindowButtons close / miniturize / expand like so: //Create the buttons NSButton *minitButton = [NSWindow standardWindowButton:NSWindowMiniaturizeButton forStyleMask:window.sty...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: store the form values of textboxes automatically in database In c# windows application, I want to store the textbox values automaticaly into a database table as they are being entered.the database row should be updated as the user fills in all the textboxes. how to do it? A: your question is really vague and generi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: How do I deploy a CLR Stored Procedure via the MsBuild command line? I can deploy a SqlClr project project from Solution Explorer by right clicking it an selecting Deploy. However, I would like a command line version where I can also specify custom ConnectionString. A: The command is msbuild MySqlClrProject.csproj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634794", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a way to show all docvariables from a word file? I have a Microsoft-Word File which contains several DocVariables. In our application we fill/replace these DocVariables with content. With the shortcut Alt+F9 I can switch in a mode in which I can see the DocVariable. But in the document I have now, there are...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why ThreadAbortException does not throw in catch block Suppose I have this code: static void Main(string[] args) { var thread = new Thread(() => { try { throw new InvalidOperationException(); } catch (Exception) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to validate the mail in the server side How to validate Email in server side . I know how to do that in client side but what about the server side? A: You can try this. String mail = "YYY@imail.com"; string expression = @"^[a-z][a-z|0-9|]*([_][a-z|0-9]+)*([.][a-z|" +@"0-9]+([_][a-z|0-9]+)*)?@[a-z][a-z|0-9|]*\...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634804", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Move a pin according to the position of the user In my iPhone application, I want to drop a pin at my current location using mapView and I also need to move another pin or a ball as my position changes. How can I do this? A: To display user location, just add : mapView.showsUserLocation = YES; To get it, use the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Send object to restful service I am using restEasy(Restful implementation for jboss) ejb3.0, Jboss5.1.1 AS I did restful service which accepting simple object. this is at the server side: @POST @Path("testObjects") @Consumes("application/xml") @Produces("text/plain") public String testObjects(GrandSun sun) { Sys...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Matlab RGB color representation ([255 255 255] and [1 1 1]) What's the difference between above two representation of white color? I'm a bit confused, and how they are used? A: The two equivalent representations are uint8([255 255 255]) and double([1 1 1]) These are just the integer and floating-point representat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: how to catch error code in PHP i want to add records to table 'pool' with attribute ID and empName from database employees theform.html <FORM NAME ='form2' METHOD ='POST' ACTION ='result.php' enctype="multipart/form-data"> <B>Board Write</B> <BR> <INPUT TYPE = Text Name = empID value = 'write ID here'> <INPUT TYPE ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to post on facebook wall, without opening dialog box? I'am having a quiz program on my site where user logs in through their facebook account and play the quiz. After successfully completing the quiz I want to post their score and rank on their wall. Facebook login and logout is working fine. How do I show the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Running cron job from browser I have several cron jobs that run automatically, and I was requested to add a button that says 'run now' in the browser... Is this possible? Some of these cron jobs need to be executed from command line as they take around 15 minutes... Is it possible to execute them from the browser, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: WCF service calls includes same information in every call I have a web service that will be consumed by some application (web site currently). The calls are almost all specific to a certain client but still the same. So one call might be getAllFoo() but I would need some parameter to say from which client the Foo i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: dompdf table rendering issue I'm using DomPDF to generate invoices in a project I'm working on. I've done so several times before and never had any trouble but since today however It got so slow that the maximum execution time gets reached. I've confirmed that this happens because of: $dompdf->render() I'm generatin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is mLeft and mRight showing in hierarchyViewer? I'm trying to see my view properties using hierarchyviewer tool. My first problem is that my view seems to be invisible although I didn't do anything to make it invisible. My second problem is I see to values, mRight and mLeft which I expect to be the padding sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634826", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Tri state image button cant get both mouse over & pressed work together Hi I'm trying to create a three state button using three images. I cannot get both mouse over and pressed triggers work together. In the code below, mouse over works fine but the pressed image does not show when the button is pressed. <Button x:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting the videos from iPhone in our app How can we get the video which are stored in the iphone library and Can we save that in our local database in our app and then we will delete the video from the iPhone Library, so that the video cannot be able to access in the iPhone library, but it can be used in the app. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7634832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }