text
stringlengths
8
267k
meta
dict
Q: Uncaught Throw generated by JLink or UseFrontEnd This example routine generates two Throw::nocatch warning messages in the kernel window. Can they be handled somehow? The example consists of this code in a file "test.m" created in C:\Temp: Needs["JLink`"]; $FrontEndLaunchCommand = "Mathematica.exe"; UseFrontEnd[Not...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why are my tunneling event arguments object and bubbling event arguments object not equal? I'm working through the 70-511 book, and am looking at the section on Routed Events. I noticed it mentions that bubbling-tunneling event pairs share the same EventArgs instance, so if you handle the tunneling event (eg Preview...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Providing EntityManager by an @ConversationScoped method I tried to run the simple JEE6 application generated by maven archetype groupId: org.fluttercode.knappsack , artifactID: jee6-sandbox-archetype in JBoss7. (went through this turial, sorry, in German) However, when calling the welcome JSF, I get the following e...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: In xcode does anyone know how to check that a string is this kind of phone number (123) 456-7890? I've tried this and it's not working: range1 = NSMakeRange(0,[string length]); NSRegularExpression *regex; regex = [NSRegularExpression regularExpressionWithPattern:@"([0-9]{3}) [0-9]{3}-[0-9]{4}" optio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Uploading a photo to Facebook album from Windows server doesn't work I've an app with which users can add pictures to their albums using curl. I've coded it on my linux server and everything worked perfect. So I've uploaded the app into my clients server (which is windows) and photo upload doesn't work, I cant figur...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Actionscrpipt 3 OOP I am developing player which has several my own custom developed buttons which has their own classes. Also the player has its own class which is the main class and instansiate all the buttons I have. So this is a simple example of "has a" relationship i.e composition. I used to past a reference ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is the map function in Perl implemented? Is map function in Perl written in Perl? I just can not figure out how to implement it. Here is my attempt: use Data::Dumper; sub Map { my ($function, $sequence) = @_; my @result; foreach my $item (@$sequence) { my $_ = $item; push @result, $...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how to add two variables to URL in JSP? I want to add two variables to URL in JSP <a href="buyOrSell.do?symbol=<%=trade.getSymbol()%>&mktPrice="<%=trade.getCurrentMktPrice()%>>Buy</a> ex - http://loclhost:8080/myProj/buyOrSell.do?symbol=anySymbol&mktPrice=price but I am not able to get second variable. A: Seems li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626523", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Copy resources with frank and cucumber I have a iPhone project where i use frank and cucumber for acceptance testing. My application has a feature to collect files from the documents directory and index them in the applications database. I want to test this feature with cucumber. But this means i have to copy files ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Load shared library by path at runtime I am building a Java application that uses a shared library written in C++ and compiled for different operating systems. The problem is, that this shared library itself depends on an additional library it normally finds under the appropriate environment variable (PATH, LIBRARY_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: produces an HTML file from XML I have a XML file with Rectangle elements that contains sub-elements - RGBcolor,ID, height and width. Now i need to draw the rectangles into a HTML web page with the mentioned sizes, color and name into several DIVs. how do i do it? I'm new in the business so please try to detail as mu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: facebook shows "not found." when clicking the received app requests sent by graph api just as the title. I sent a app request to my facebook account by this way. http://developers.facebook.com/docs/reference/dialogs/requests/ and then, I received a notification on facebook. says like that: *Johanna Bassam Bassam Har...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Unparseable date Exception Well, i'm trying to catch date from rss, and i get this execption in logcat: E/AndroidNews( 870): Caused by: java.text.ParseException: Unparseable date: "Su n, 02 Oct 2011 14:00:00 +0100" E/AndroidNews( 870): at java.text.DateFormat.parse(DateFormat.java:626) E/AndroidNews( 870): at...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are SQL strings null terminated? I was learning how to use len() function. When I found out the length of a cell having 12 characters, it gave me result 12. Now I was thinking that arent the SQL strings null terminated(As if they would have been then len() should have returned 13 not 12)? Please help me out. Thanks ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Visual Studio Find and Replace with Regex I want to replace C# attributes with VB.NET, which means, [Serializable] should become <Serializable>. The pattern (\[)(.+)(\]) does find the results but I don't know how to replace the first and the last groups with the appropriate parenthesis. I read this page, but I didn'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Converting Rails 2 routes to Rails 3 Like in my first question from yesterday, I'm still doing that tutorial. I've encountered another issue with the Rails 2 / Rails 3 routing differences. So my question is: How do you "translate" this: <%= form_remote_tag(:controller => "posts", :action => "create") do %> to Rai...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: TouchXML (Sudzc) and using this data properly I am using Sudzc (it uses TouchXML) for parsing my web services WSDL, now I am using multiple web services with almost the same WSDL definitions. I edited my code to use this, this is what happens: CXMLNode* element = [[Soap getNode: [doc rootElement] withName: @"Body"] ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626552", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Packages for Beginners When a classfile that belongs to a package, then package PackageName; is included in the source code of that file. So when jvm is invoked by writing java PackageName.classfilename it gets executed. Is it that "package PackageName" guarantees the jvm that this classfile belongs to this ver...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android draw border in ImageView I want to draw a border around an image. But I can't align the border at the ImageView itself (like it is done mostly) because I translate and scale the image inside of the ImageView with the ImageMatrix (the ImageView itself is fill_parent / fills the whole screen). I had the idea t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626554", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Android USB reverse tethering: How to fool the apps USB reverse tethering = Cellphone gets network connection from PC via USB. I know how to do USB reverse tethering except for one problem: Many Android apps will check network connection using the code below before doing any useful work: ConnectivityManager connecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Is there a way to pre-cache a web page for viewing with an Android WebView? I've read about the HTML5 cache manifest, and I've seen Android does support caching websites using the cache manifest. I want to use the cache manifest to download all the required resources for my website to preload it, and then open a Web...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: designing a REST api that supports multiple screensizes Until now all my thumbnails have been 150x150. I would like to support different thumbnail sizes, in order to deal with different Android/iPhone models. I have been considering this way of supporting multiple sizes. Always working with square thumbnails to make...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why document.ready waits? I know that Document.ready - DONt wait for images to download. So why it does here ? http://jsbin.com/ehuke4/27/edit#source (after each test - change the v=xxx in the img SRC) <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problems with changing the Orthogonal Projection Matrix I was experimenting with opengles, and made some simple squares moving around the screen: //inside my renderScreen() method, called from onDrawFrame() gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glMatrixMode(GL10.GL_MODELVIE...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best way to refill data in ListAdapter (ListView) I do use this code for refill ListView with data after they change // ListView lv; // MyListAdapter la; // DataClass dc; dc.remove(object_id); lv.setAdapter(la); Is this the best way since we can't use notifyDataSetChanged() which is available only in ArrayAdapter ?...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get plain text response using AJAX using Dojo I created a sample web service that returns a plain/text value (you can access it HERE (it's safe)). I just created something similar to those that I will use in my project. I tried using Dojo's xhrGet method but it didn't work. I had read about The Same Origin Po...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Using a foreach loop to get create variables from $_POST security issues? In the past I have used the following to create variables from a posted form. foreach($_POST as $k=>$v) { $$k = $v; } What are the security risks associates with using this method? im trying some test atm. how about this version where it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Mystery issue with GIF upload? Alright, so whenever I upload this GIF to my board (NGINX+PHP-FPM) I get a slow down until an eventual 504 Gateway Time-out, alright, so I know what you're thinking, "go ahead and fix those nginx.conf and php-fpm settings", well I tweaked them to near perfection last night, my server i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Storing HTML in MySQL: blob or text? I have to store large amount of HTML data in a database . I have Googled and found something about the blob datatype, I checked it and it is working correctly. I need to store the HTML pages in the tables and need to show them correctly as web pages on demand. So, which is better...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Java Desktop Application - how to obtain list of files with similar file names in a specific folder I have a Java Desktop Application, in which at an intermediate stage, some files with the following file names are generated file-01-1.xml file-01-2.xml file-01-3.xml and so on. The number of files with such names i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to put wait condition in Signal-Slot? I am doing one web related project. Recently I hit on this situation. This is just a stub Class My_Class { public: My_Class(); void start(); public slots(): void after_Load_Function(); } My_Class::My_Class() { //Some initializations connect(WebPage,SIGNA...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ variadic function templates The concept of variadic templates is quite confusing to me and I want to make it a bit more complex (well I think...). Let us consider the following code: template <typename T> class base { template <typename... E> virtual void variadic_method_here(E... args) = 0; }; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java complains I haven't implemented a method I have the following interface: interface IBasicListNode<T> { /** * Returns the current element */ public T getElement(); /** * Gets the next ListNode. Returns null if theres no next element */ public IBasicListNode<T> getNext(); /** * Sets the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626601", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Scala final vs val for concurrency visibility In Java, when using an object across multiple threads (and in general), it is good practice to make fields final. For example, public class ShareMe { private final MyObject obj; public ShareMe(MyObject obj) { this.obj = obj; } } In this case, the vi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Programmatically add a new layout inside a SwipeView I will try to explain my question in a very clear and understandable way. I am currently using the SwipeView here: http://jasonfry.co.uk/?id=23 <uk.co.jasonfry.android.tools.ui.SwipeView android:id="@+id/swipe_view" android:layout_width="match_parent" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pass textures in shader The problem is that I pass two textures in shader, but the picture on 3-d model is the same for both sampler2D variables (It is with image "normal.jpg", the first one.). I'll be very grateful for help. Here is the code: GLuint _textures[2]; glEnable(GL_TEXTURE_2D); glGenTextures(2, _texture...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626619", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery in html injection For example I have 2 input's and one button with attribute, where i wanna use input values, it may be something like this: <input data-link="test?input1=$('#input1'.val())&input2=$('input2.val()')" /> A: --------------Mind reading mode on--------------------- You have; <input id='input1' ty...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Inline Function Arguments Passing Is there a need performance-wise for inline functions to pass its arguments by const reference like foo(const T & a, const T &b) compared to by value foo(T a, T b) if I don't change the values of a and b in the function? Does C++11 change recommend anything specific here? A: Theo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Frozen Android emulator due to audio problems? Today I installed the latest version of Eclipse, Android SDK and AVD plugin. But I have a tedious problem. When I want to quit the emulator (with the X button), the emulator freezes and I can't click anything there anymore. Obviously it has something to do with the soun...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626635", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how can i fetch the whole word on the basis of index no of that string in perl I have one string of line like comments:[I#1278327] is related to office communicator.i fixed the bug to declare it null at first time. Here I am searching index of I#then I want the whole word means [I#1278327]. I'm doing it like this: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: python tweet parsing I'm trying to parse tweets data. My data shape is as follows: 59593936 3061025991 null null <d>2009-08-01 00:00:37</d> <s>&lt;a href="http://help.twitter.com/index.php?pg=kb.page&amp;id=75" rel="nofollow"&gt;txt&lt;/a&gt;</s> <t>honda just recalled 440k accords...traffic around here is gonna be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626643", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Writing binary data from encrypted file to pointed memory location First of all the code for aes cryptographic function : void xorcrypto(u_int8_t *key, u_int32_t keylen, u_int8_t *data, u_int32_t datalen) { /*u_int8_t ....etc are alias for uint8_t...etc so don't bother about them*/ FILE *fp,*fq,*fr; int i; fp=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Printing all Possible nCr Combinations in Java I'm trying to print out all possibilities of nCr, which are the combinations when order doesn't matter. So 5C1 there are 5 possibilities: 1 , 2, 3, 4, 5. 5C2 there are 10 possibilities: 1 2, 1 3, 1 4, 1 5, 2 3, 2 4, 2 5, 3 4, 3 5, 4 5. I made functions that print what ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In Windows, how do I find out which process is on the other end of a local network socket? That is to say, if I have a server listening on 127.0.0.1, and a TCP connection comes in, how can I determine the process id of the client? Also if there isn't an API for this, where would I be able to extract the information ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Undefined reference to svc_create My problem is the following: I'm trying to implement a C RPC example and I keep running into the following compiler error: remote_exec.c: In function ‘main’: remote_exec.c:13:3: warning: implicit declaration of function ‘svc_create’ remote_exec.o: In function `main': remote_exec.c:(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a more generic way of iterating,filtering, applying operations on collections in F#? Let's take this code: open System open System.IO let lines = seq { use sr = new StreamReader(@"d:\a.h") while not sr.EndOfStream do yield sr.ReadLine() } lines |> Seq.iter Console.WriteLine Console.ReadLine() Here I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does closing the simulator make my app receive SIGTERM when my app is in the background? When I get this: - (void)applicationWillResignActive:(UIApplication *)application { I release all my objects and invalidate all my timers. When I get this: - (void)applicationDidBecomeActive:(UIApplication *)application { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626654", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Testing of App on Tablet, Android I need to create application for Tablet, Android. I never create app fot Tablet, only mobile with Android. How can I create emulator for tablet testing? And 1 thing - I need to know a width of screen for logotype creating - what screen size Tablet have? A: For a tablet emulator, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MEF vs Unity import into view model When using unity you can import the container in the constructor of a view moder per say. But how would I do import a MEF container into a view model to resolve instances? Thanks A: Generally, it is not a great idea to be passing round the container, as you end up using it as mor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626657", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Django: Query with F() into an object not behaving as expected I am trying to navigate into the Price model to compare prices, but met with an unexpected result. My model: class ProfitableBooks(models.Model): price = models.ForeignKey('Price',primary_key=True) In my view: foo = ProfitableBooks.objects.filter(...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Are there any cons to putting revision number on app home page? There are obvious pros of having revision number somewhere on the page (like on stackoverflow.com): easy for users to identify and report version, when they have issues; easy way to see that deployment was successful; etc. Are there any cons to that pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Access a Model property in a javascript file? Is it possible to access a Model property in an external Javascript file? e.g. In "somescript.js" file var currency = '@Model.Currency'; alert(currency); On my View <script src="../../Scripts/somescript.js" type="text/javascript"> This doesn't appear to work, however i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Double border size on hover pseudo-class On my nav bar there are two nav links with rounded borders, which when they are hovered, the border size doubles. I can't get it to work without the nav link moving on hover and the hover border doesn't match the area of the original border. I'm sure it has to do with padding...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: host a facebook app on multiple locations (variable redirect_uri) I'm currently building a facebook app integration and got stuck on error 191: The specified URL is not owned by the application. (when trying to authenticate a user) I realize the problem is the Site URL, which was not entered. However, my problem is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626667", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Space after reading in HTML content and echoing it I have an index.php-file, which will echo the string with the returned .html-file prepared by the function which is called in the index.php-file index.php: require_once('functions.php'); echo create_page(); functions.php: function create_page() { $result = fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why doesnt work? Its my understanding that by adding the ScaffoldColumn(false) annotation to an property in a class, that property will not added to the view when doing Add View. However even though i have added scaffoldcolumn false to properties i dont want added to a Create form, they are still rendered inthe cre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626671", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: List> generics issue I have the following method: public static List<List<String>> createObject() { List<List<String>> listOfListOfStrings = new LinkedList<List<String>>(); List<String> listOfStrings = new LinkedList<String>(); //do some populating on the lists here listOfListOfStrings.add(listOfStri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MongoDB GetDate Syntax In SQL Server while trying to insert records you have the option to specify GETDATE()-1, GETDATE() I tried below statement for MongoDB db.TableA.insert({Name:ABC,SaleDate:this.date.getDate-1,SaleValue:2500,City:XYZ}) This does not work. What is the MongoDB equivalent syntax to insert getDate...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: microsoft jscript runtime error object doesn't support this property or method jquery I a using asp.net vs 2008.I am trying jquery. I am getting this error "microsoft jscript runtime error object doesn't support this property or method jquery" Any help is appreciated. This is the code i am using. <title></title> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626678", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: setup.py install location? I'm running Mac OS X Lion 10.7.1 that has both python 2.6 and 2.7 installed. I've made 2.6 my default version. I am trying to install a package and it installs to 2.7. My setup looks like this: ~:hi› which python /usr/bin/python ~:hi› python -V Python 2.6.6 ~:hi› python Python 2.6.6 (r26...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626682", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to retrieve content from a website with VS 11 I am trying this in Visual Studio 11 in Windows 8. As I see I can't use WebClient to do this, so I tried using HttpClient: var client = new HttpClient(); var response = client.Get("http://google.com"); var result = XDocument.Parse(response.Content.ReadAsString()); M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Ubuntu passing command line arugments to C program I am learning C programming, I wrote the sample code to accept parameters from terminal and print out the arguments. I invoke the program like this: ./myprogram 1 I expected 1 to be printed out for the argument length instead of 2. why it is so? There was no spacing...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Windows create dynamic amount of links In my application i'm going to have a list of links I would like the user to be able to click on and will take them to a certain website. The problem is, first, it's possible there is going to be alot of links, second, there is a dynamic amount of links, and the amount changes....
{ "language": "en", "url": "https://stackoverflow.com/questions/7626690", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Windows Application - Setting Tab Control Transfer between input fields I developed a windows application. The input screen has two date pickers followed by a set of textbox as input fields. * *After checking on the Dates *When I click on Tab Control, Cursor is not transferred for next input, it goes to submi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to move a row from a table to another table if a Column's value changes in SQL? I have two tables, Hosts, and UnusedHosts. Hosts has 17 columns, and UnusedHosts has 14 columns, where the first 12 is the same as in Hosts, and the 13th is a UserName, who moved a host to UnusedHosts, and the 14th is a date, when he...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626706", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to parse JSON to a dynamic object on Windows Phone 7? For web applications I can use System.Web and use this trick to convert JSON to a dynamic object. But for Windows Phone I can't use JavaScriptConverter. What is the workaround to convert JSON in a dynamic object on Windows Phone 7.1? A: Json.Net ( http://jam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626717", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sql Server Delete and Merge performance I've table that contains some buy/sell data, with around 8M records in it: CREATE TABLE [dbo].[Transactions]( [id] [int] IDENTITY(1,1) NOT NULL, [itemId] [bigint] NOT NULL, [dt] [datetime] NOT NULL, [count] [int] NOT NULL, [price] [float] NOT NULL, [platform] [char](1) NOT NUL...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Text Display Jumping Left-Right due to character width difference I am using an EditText to display text received from a serial port which is updated 10 times a second, it works fine but one of the lines of text has a character that alternates beyween a digit and a dash (-). Becuase the dash is narrower than the dig...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626720", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the propper way to use Cursor Adapters and Content Providers in android 2.2 i'm confused and i need your help. I try to follow the instructions given by Virgil Dobjanschi on his lecture 'Developing Android REST Client Applications' given on Google IO 2010. Unfortunately, i can't find the way to implement vali...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL - how to efficiently select distinct records I've got a very performance sensitive SQL Server DB. I need to make an efficient select on the following problem: I've got a simple table with 4 fields: ID [int, PK] UserID [int, FK] Active [bit] GroupID [int, FK] Each UserID can appear several times with a GroupID (...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: \r\n Not Working in text email coding? I am sending an email which attaches a pdf. This is the code: $mpdf->WriteHTML($html); $content = $mpdf->Output('', 'S'); $content = chunk_split(base64_encode($content)); $mailto = $email; $from_name = $yourname; $from_mail = $fromwho; $replyto = $replyto; $uid = md5(un...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626724", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Fluent nHibernate and interfaces Does fluent nHibernate play well when using interfaces instead of concrete classes as properties? E.g. A sports stadium has a reference to a city that it is in, so our interfaces/concrete classes looks as follows Interface: ICity int Id; string Name; IStadium int Id; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626729", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Flash Gets Blocked By ISP I have developed a set of flash games which are being used by several schools across the UK. For some odd reason, the school cannot seem to load the Flash games.... Upon contacting the ISP (SWGFL) - I was told that the network would automatically block flash games. This is all well and good...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Error with setCompressionType Is there someone that can help to correct this code? I'm working with JAI and I'm trying to compress JPG file to Losse-less here's my code `ImageWriter writer= (JPEGImageWriter) ImageIO.getImageWritersByFormatName("jpeg").next(); javax.imageio.plugins.jpeg.JPEGImageWriteParam...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Sidepanel with Qt I'd like to implement a sidepanel in my Qt window. I search something like the one that is used in the Visual Studio (see below). Important notes: * *The widgets don't have to be moveable *resizing should be possible *each widget should be clearly separated from the other layout Does anyone...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Extending ruby in C - how to specify default argument values to function? I'm trying to write a C extension to ruby that'll generate a class. I'm looking on how to define some default arguments to a class. For example, if I have this class decleration in ruby: class MyClass def initialize(name, age=10) @name =...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to match a string with an optional "/" at the end? I am trying to match a URL such as; http://www.testing.com/documents/dashboard What I want is to match "/documents/dashboard" or "/documents/dashboard/". How can be this done? preg_match('/^\/documents\/dashboard[\/|]$/i', $_SERVER['REQUEST_URI']); This doesn't...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Necessary to retain controller for datasource and delegate of uiPickerview? As I understood, I should not be retaining a controller which is a delegate or datasource. I have made a UIPickerView, created in a property accessor as such: -(UIPickerView *)projectPicker { if (_projectPicker != nil) { return _proj...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Query optimization in massive tables I have a table containing brick and mortar shops. The table is about 15 million rows with 30 columns. For now, the query time to retrieve a shop when the user types the name of the shop is about 15 to 20 seconds (we display an autocomplete list so the user can directly select fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-4" }
Q: IE6,IE7 css menu ul I think this is a trivial problem: All browsers and IE 8+ display my ul menu : but IE6 and IE7 display: Any soltion for this problem? CSS: div.art-nav { position: relative; height: 25px; z-index: 100; } .art-nav .l, .art-nav .r { position: absolute; z-index: -1; top: 0; height: 25...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Multiple Definition errors in c++ Here's some code that I wrote in DevCpp (windows), now I'm trying to get it to run in linux without much success. Here is the source code screen.h #ifndef SCREEN_H #define SCREEN_H #include <graphics.h> class Screen { private: int max_x,max_y,grid_size; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Blank PHP/Index Page on Android HTTP Post Request Upon using the code samples below, I try to send a HTTP request to validate a username and password entry to a PHP script (returning either 1 or 0 in an echo). Using HTTP Assistant, testing the HTTP Post request has the expected results... But for some reason, when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626775", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make a panel transparent like glass How to give c# panel glass like transparency something similar to this (image after clicking on show desktop of windows 7) ? And will it work properly under windows XP ? A: Take a look at this code project GlassPanel. This tutorial may also help ExtendGlass
{ "language": "en", "url": "https://stackoverflow.com/questions/7626777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Deleting a pointer In C++, whats the recommended way of deleting a pointer? For example, in the following case, do I need all three lines to delete the pointer safely (and if so, what do they do)? // Create MyClass* myObject; myObject = new MyClass(myVarA, myVarB, myVarC); // Use // ... // Delete if(myObject) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting "set statistics io on" results in t-sql for tuning I want to add monitoring capabilities to a complex process involving many stored procedures. In some cases I want to capture the number of logical reads produced by a single statement. In other words, I would like to turn on the set statistics io on, access ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626788", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Generating routes in javascript with Twig and Symfony2 Quite odd problem, sorry for asking, i'm quite new to Symfony/Twig. My route requires a mandatory region_id paramenter: ajax_provinces_by_region: pattern: /ajax/region/{region_id}/provinces defaults: {_controller: SWAItaliaInCifreBundle:Ajax:provincesByRegio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: How do i "version" a C binary file on linux platforms usually the practice is not to include binaries in source control repositories, i am using mercurial, and would like to know if anyone has experience with embedding version (minor + major) in a C Binary, so that when its distributed if i use a command line argume...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626793", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: XML save all children to variable I am using jQuery AJAX to get a XML file with: $.ajax({ type: "GET", url: phoneXmlPath, dataType: "xml", contentType: "text/xml; charset=utf-8", success: function(xml){ $(xml).find("phone[phone_id="+phone_id...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding regular expressions for languages otherwise described Letting {a b} be the alphabet set, write a regular expression for: 1) The language of all those words in which the number of a's and the number of b's are both odd; 2) The language of all those words whose length is odd and which contain the substring ab....
{ "language": "en", "url": "https://stackoverflow.com/questions/7626800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Custom PowerShell Cmdlet does not accept Variables I have a custom PowerShell cmdlet that has the following attributes on one of the input properties. The property is a get/set of type float . I want to be able to supply this property with either a float value or a variable. [Parameter( ValueFromPipeline=true, Valu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to position these CSS elements without defining height and width I am trying to create a little graphical box for a time element on a website. What I would like to have is something like this: I have this HTML: <div class="entry-meta"> <time class="entry-date" datetime="2011-09-16T09:59:48+00:00" pubdate=""...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to run ruby files? Example I have the file test.rb: puts "test test test" How do I run this file in the ruby console? A: load("test.rb") should do the trick in irb. A: load 'test.rb' Do you mean Rails console? (Same thing, but the question is tagged rails.) A: On Mac you can run in three different ways from...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm to find special point k in O(n log n) time Give an n log n time lower bound for an algorithm to check if a set of points has a special point k. k is defined as: for a set A of points, if for every point m in A, there is a point q in A such that k is in the middle of the line segment mq such a k does no...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626813", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: AJAX call to a WebMethod I have the following Webmethod in my C#/.NET web-application, file lite_host.aspx.cs: [WebMethod] public static bool UpdatePage(string accessCode, string newURL) { bool result = true; try { HttpContext.Current.Cache[accessCode] = newURL; } catch { result = fal...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails: How to receive non-model form input, convert it to a model attribute, and then save that model Background: * *I have a form_for mapped to a model called List. *List has attributes: name, id, receiver_id, assigner_id. *I want the user( or list assigner) to be able to choose a list receiver. *I want the a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: sqlite multiple databases insert/update/delete I was wondering how SQLite behaves when it's given multiple databases to insert/update/delete in at the same time? Does it spawn multiple processes which can in theory have better concurrency than using a single database/single process or it utilizes the same process fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626821", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Self-cloning executable with .NET reflection I'm trying a sort of experiment in C# .NET. I'd like to create a program that clones itself (eventually as a mutated clone). Finally, I want it to produce a "son" that also needs to have the ability to clone himself and so on! I want to make something like this: static v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Delphi action list equivalent in C# in Delphi there's action list , what's the equivalent to it in C# 3 winforms application I searched a lot but didn't find any proper way A: There is no equivalent in WinForms. This is one of the most common complaints when a Delphi developer switches to WinForms. There are vari...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: NSButton with an Image I have a question. I have a button on my .xib and a background image. I set an image to my button through the attributes inspector, but when I run the program and press the button, this happens: If I don't press it, it looks fine. What's wrong? A: This is controlled by the setHighlightsBy: p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Recreating an Android View in OpenGL Android views are generally quite laggy. I was wondering if it could be possible to like recreate them in OpenGL-ES to use hardware acceleration on it. If it was possible i'd guess it would have been done already. Is it usefull or possible? A: You can implement a GLSurfaceView ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7626833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }