text
stringlengths
8
267k
meta
dict
Q: Some simple XNA/HLSL questions I've been getting into HLSL programming lately and I'm very curious as to HOW some of the things I'm doing actually work. For example, I've got this very simple shader here that shades any teal colored pixels to a red-ish color. sampler2D mySampler; float4 MyPixelShader(float2 texCoor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How can I create a function in another frame? I have a 3rd party generated frameset (from a help system) and I can add code to the subframe that has my content pages. I cannot modify the other frameset content since it is generated by a build process. I can have some js code myhandler() on each of my HTML content pa...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617429", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why don't I see my TODOs for my PHP files in Eclipse? Why don't I see my TODOs for my PHP files in Eclipse? I ran into this issue in PDT, I just wanted to put the answer up in case someone else did too. A: I ran into this issue in PDT, I just wanted to put the answer up in case someone else did too. * *ANSWER * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Device Identification and setup api Is there a way to obtain properties of devices that correspond or belong to the guid class namely ClassName "Sensor". I want to obtain information to filter out devices(sensors) that are not relevant. I believe you can enumerate devices with SetupDiEnumDeviceInfo but is there way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get a list of all refs a git push would push? We're trying to implement a git workflow where there exists a pre-receive hook on the remote repo to validate that all pushed refs have commit messages that contain certain required information. In order to provide some convenience to developers, we'd also like a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: isFinishing is not always accurate in onPause() I encountered a scenario that isFinishing() returned false, but the activity still exited. There is Activity Abc in the scenario, which contains a button. When user clicks on the button, Activity Xyz will be started. Now on Abc activity, I clicked the button on it and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to read a text file from the last line to the first I need this to run in reverse so that the lines appear in the reverse order of this. Is there a quick way to flip a TextView or something like that? Thanks for any help. try { // Create a URL for the desired page URL url = new URL("text.txt"); // Read all th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I get the YouTube preview image to show up in an Android WebView? I realize there are a lot of YouTube in WebView questions but they don't seem to address my problem exactly. I am loading a website with an embedded YouTube clip in a WebView, the problem is the YouTube preview image does not appear, I just get...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: vBulletin URL replace code I was previously asking for a smiliar function, but no one of them are like the vBulletin 4 has. I mean if I paste some URL's in the vBulletins text box it will replace them for example like this: Input: http://www.stackoverflow.com/questions/1925455/how-to-mimic-stackoverflow-auto-link-be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: When probing for assemblies why does the searched for publicKeyToken differ when running as admin vs as a normal user? I'm following instructions from a 2006 Microsoft .Net course workbook, going through one of the exercises. (Specifically this course is MS2349B and I'm doing Module 4 Exercise 2.). These exercises ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Post and receive google map location data to/from external website and android application I'm rather new to android development but I have a little project that I'd like to do and would like to know if it was possible to do. Basically what I'd like is for an Android app to add location nodes to an external database...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using print.css with @media print elsewhere I've got a webpage that uses a site global print.css stylesheet to render the page for print. The page also uses sitewide classes for divs, headers, etc. I need to increase the width of the body and the size of the font of this page in the print version. I don't have acc...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617457", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Terminal emacs colors only work with TERM=xterm-256color I've found that terminal emacs does not render the correct colors unless I explicitly set TERM=xterm-256color. I use gnome-terminal, and from what I understand, TERM should be set to gnome-256color. Similarly, I tend to use tmux a lot, which advises against an...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: How to keep CPU from 'sleeping' when screen is turned off in Android? I have an application in which I am sending network data over WiFI. Everything is fine until I turn the display off or the device goes to 'sleep'. I'm already locking the WiFi however, it seems to be the case that the CPU speed ramps down when in...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: I do not know why I keep on getting strange feedback when I am trying to format phone numbers from a user in java. Whenever I type in a phone number, this program below that I wrote to format phone numbers from the user gives me back weird numbers that I did not even enter at all. Can someone please explain to me wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: XmlSimple - using xml_in() to parse data in Ruby on Rails I have a simple XML file like this: <Course> <CompanyName value="Ford"/> <DepartmentName value="assessments"/> <CourseName value="parts"/> <Result> <CoreData> <Status value="completed"/> In my controller I have: def xm...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can't call FB.ui in dev (localhost) environment I used to be able to, but for some reason all my Facebook Javascript API calls using FB.ui() no longer work in my development environment where my url is localhost:8080. In production it works fine though. I have a dev environment Facebook application, but I did just...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: jquery show/hide button and tooltip I am trying to make a show/hide button with jquery and I would also like the tooltip/title to change when the button is hovered over with the mouse but it isn't working at all. my code can be found here: http://jsfiddle.net/LYA6q/ A: HTML: <input id="button" type='button' value=...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to print the result of a bool as 'false' or 'true' in c? I have to write a program in which main calls other functions that test a series of number if any are less than a number, if all the series' numbers are between two limits, and if any are negative. My code returns the values of 1 for true and 0 for f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is there any clever way to determine whether a point is in a rectangle? I want to calculate whether a point, (x,y), is inside a rectangle which is determined by two points, (a,b) and (c,d). If a<=c and b<=d, then it is simple: a<=x&&x<=c&&b<=y&&y<=d However, since it is unknown whether a<=c or b<=d, the code should...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617486", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Copying devices in Linux I am working at an OS independent file manager, in C. I managed to copy files, links and directories, but I am not sure how to copy devices. I would appreciate any help. A: To create a device file, use the mknod(2) syscall. The struct stat structure will give you the major and minor device ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make cucumber run all feature if no matching tag Im using cucumber with fork. I really like the run_all_when_everything_filtered on Rspec. that runs all the spec if there is no matching tag. Can I do this with cucumber. example in my auto test profile, i specify --tags @wip, but if there is no matching tags i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Multi-boxed layout in CSS using DIVs I'm making a website and trying to create a login box. I have a website with two boxes of content, and I want to add a third "login box". However, I can't seem to do this, because it appears above (when I have the current width of the container) or above (when I increase the widt...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617492", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unit test expected to throw an exception when calling an asynchronous operation on MSTest The source code below is an example code snippet about my problem. I expect an exception to be occurred when an asynchronous operation is called. Unit Test [TestMethod()] [ExpectedException(typeof(Exception))] public void Opera...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617494", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: RegEx to replace trailing underscore with number of a string I have an ID that looks like this: prefix_my-awesome-slug_123 Now I would like to have a regular expression that removes the underscore and number on the end (_%d). A: for perl like regex implementations this should do it: s/_\d+$// A: /_[0-9]+$/ - easy...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: How to use execv for commands whose location is not known? Say I want to spawn a process and run execv to execute a command like ls then this is how i do it: char * const parm[] = { "/usr/bin/ls","-l" , NULL }; if ((pid = vfork()) == -1) perror("fork error"); else if (pid == 0) { execv("/usr/bin/ls", parm); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: HTML Frames HTML frames are a way of displaying multiple HTML documents in a single browser window.
{ "language": "en", "url": "https://stackoverflow.com/questions/7617500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Silverligtht WCF enabled service with Prism Im required to write a Silverlight application using WCF. I'm also required to use Dependency Injection to gain access to this service in another library. (I add a Silverlight enabled WCF Service) The problem is in trying to use Dependency Injection (Prism/MEF in this cas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Javascript mp3 audio data Say i have a HTML5 tag. Is there any possible way for Javascript on the page to get the current speaker output, and then graph it to produce a volume bar that got larger when the music got louder and smaller when the music got quieter? I don't care if it works in IE or not. If this is not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617519", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Something with raytracing that has gone wrong I'm trying to do a simple ray tracing assignment, in c# (ported from python). I've managed to make the sample code show the correct picture, but when I try and adapt it to my assignment something goes wrong. If I knew what was going wrong I would post some code that I th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617524", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Ant mkdir failed i'm new to ant. Please highlight which goes wrong in my build.xml. Any help is appreciated. Thanks. Problem: The folders i wanted to make kept created on the upper level of current directory. * *ant version: 1.8.0 *platform: LinuxMint 10.10 *java version "1.6.0_20" *OpenJDK Runtime Environmen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Animate two views like when you pass a phone call I have made many tries to have the same effect of switch than the one you can see when calling a phone number : the front view disapear with a zoom effect, while the other one appears also with a zoom effect. I can't achieve doing that effect, it's always a so-so. Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: bash file reading, while loop I'm sorry if this has been answered but since I'm not positive what exactly is the problem (among several possibilities) I haven't been successful in my searches. What I want to do is take label numbers that are each written as a line in a text file, do things with files containting tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617540", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: how to set the shared preferences value to a layout I have already put everything about shared preferences in place and in one of my activity I am also able to retrieve the shared preferences values like this in logcat. String i = prefs.getString("bgColor", "#f2345"); System.out.println(i); But in this activity I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Authorize login URL in asp.net MVC 3 I am working on an Asp.Net MVC 3 application. I have created admin area for the website and applied [Authorized] attribute to actionmethods after login. When I try to access these urls directly without login like admin/home or admin/productlist, I am redirected to /Home/Login wit...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617548", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Where to find Open Source Implementations of Hashing/Crypting Algorithms(header files) I am trying to find open source implementations of Hashing/Crypting(is it HMAC?) algorithms such as SHA256, SHA512, MD5. This is in C++/C I know of things like Crypto++ but I find them really difficult to include in my projects be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617549", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Python Nelder Mead with Kelley restarts I am trying to use the fmin function in scipy.optimize, which implements straightforward Nelder Mead minimization. Is there a version which exists which includes C.T. Kelley's restart? Thanks,
{ "language": "en", "url": "https://stackoverflow.com/questions/7617553", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Android: What is the standard to load a file from the filesystem? I am creating an Android app for the Samsung Galaxy Tab 10.1, but the user needs to be able to choose a file (like a text file) from the file system. In Windows, the easiest way to do this would be through an "Open File Dialog Box", but is there a sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Options for communicating between Chrome Extension and Embedding Page's Javascript I am monitoring browser events such as when a new tab is created. My extension needs to display these browser events in the new tab page. To make versioning easier I would like the extension to be as dumb as possible. That is, all it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Jquery Replace content in runtime issue What I am trying to accomplish is, using jQuery, dynamically replace the content (generated from another javascript) of div tag with id="Test". <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script> <script type="text/javascri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: check current time between time interval android I want to create an app that will allow the user to check whether or not the current time falls between a specified time interval. More specifically, I created a sql table using sqllite program, with the table specifying an end time and a start time for each record. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Allowing WMA (from TTR package) to return original value when fewer than N points When running the following: wavData = ddply(wavData, c("primary", "interference", "label"), transform, value = WMA(value,3,wts=1:3)) Some of the resulting groupings made by ddply do not have 3 points in them, thus I g...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I add the results of a MySQL query which splits a column into two to a table? I am running the following query on a table, which splits the first name and last name of each person in the Name column of the table into Firstname and Lastname: SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(Name, ' ', 1), ' ', -1) as Fir...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: JSON.NET Deserialize string abbreviation into Enum I am just getting into JSON and all that and I ran into a snag. I am trying to parse a string abbreviation. I want to parse the string abbreviation into an Enum. Lets say my strings are: 'Apl', 'Orng', 'Bna' Which for this example mean apple, orange, banana. Is the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there an alternative to using time to seed a random number generation? I'm trying to run several instances of a piece of code (2000 instances or so) concurrently in a computing cluster. The way it works is that I submit the jobs and the cluster will run them as nodes open up every so often, with several jobs per...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: Using Auto Increment with MySQL and need to retrieve that number I have a database in which I need some IDs to be autoincremented, but I also need that ID that gets auto incremented to be the Foreign Key for another table. Is there a way to recover that number within the same transaction to insert values into the se...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617589", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can any user access the %APPDATA% folder Can any user access the %APPDATA% folder? Or can only administrators read & access that directory? Also, do the permissions to access this directory differ over different Windows platforms from 2k to Windows 7? A: %AppData% is a user-specific path. Yes, any user can access %...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617594", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Java JSlider precision problems I have a list of N JSliders (N does not change procedurally, only as I add more features. Currently N equals 4). The sum of all the sliders values must equal to 100. As one slider moves the rest of the sliders shall adjust. Each slider has values that range from 0 to 100. Currently I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to repeat the alphabet with for loop in caesar cipher in C# I am making a Caesar cipher and I want to make the letters in a loop so for example if the letter 'z' needs to be shifted it should go back to 'a' for both capital and lowercase. //Array that holds each char in the plaintext inputed is declared and ini...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: python program that scans a page for a specific combination of pixels? I'm trying to write a python program that will take a screen shot and then scan the image for a specific combination of pixels, or pattern. For example: it takes a screen shot of a web page and scans the whole image for a 10X10 pixel pattern. It ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating Database using phpMyAdmin in WAMP I've installed WAMP stack and tried creating databases using phpMyAdmin. But in the Databases section it says 'No Privileges' which means that I have no rights to create database. However it seems possible for me to create, drop data bases using command line. Even when I cr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617611", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I access specific elements within a div tag using $(this)? I've got some javascript that allows me to load states into a dropdown using json anytime the user changes the country. This works great except that I can't have more than one of combination of country/state dropdowns on a page. So, given HTML like ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Objective C protocols usage I have a homework question which confused me, really badly. Below is a brief explanation of a question. Imagine you are developing an application that stores contact information. The address book may contain many entity types e.g. Human being, a company or anything else that has a co...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Android: How can I create a layout within a layout ? In my app I want to have a button that if the user clicks it than a new layout is opened within the current (acually the main) layout. the new layout should not fill all of the screen and parts of the previous layout should be grayed out. Any ideas on how to do t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make the header part of the site as low as the logo? I just changed some styling and broke my site :) and have not much clue how to set it back. I put a new image as the logo. Before it was large-font text. And now the div ends at the bottom of other text and not at the bottom of the logo. See how it is bro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NSTextView incorrectly displaying text from an attributed string based upon HTML I have the following text - ❶can be added as The above text shows up fine in Text Edit. But when I try displaying the same in NSTextView, I get strange characters - â¶can be added as The following is the code that I am using to displ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: XSetInputFocus fails In my Xlib application, I need to set up the keyboard to focus on a specific component, and I though of doing it with XSetInputFocus. For some reason I always get a BadMatch error even though my window is visible (and the man pages say that the cause for this error is a window which is not visib...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the simplest way to navigate through a list of images? The purpose of this is to view remote images with a browser. I already have set apache and I can see the folder of pictures with directory listing. The bad thing, is that I have to click each image, each time I want to see one. What I want is to navigate ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Add a prefix to each item of a PHP array I have a PHP array of numbers, which I would like to prefix with a minus (-). I think through the use of explode and implode it would be possible but my knowledge of php is not possible to actually do it. Any help would be appreciated. Essentially I would like to go from this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "89" }
Q: Why can't i use external header? I created a "Cocoa Touch Static Library" and it builds just fine. Peachy so far. Then I created a view based application for iOS. I can import the header from my previously created lib, but I can't run the program. It's always returning: Undefined symbols for architecture i386: "_OB...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to restart a task elegantly? So I have something like this: Task.Factory.FromAsync<TcpClient>(tcpListener.BeginAcceptTcpClient, tcpListener.EndAcceptTcpClient, tcpListener).ContinueWith(ConnectionAccepted); private void ConnectionAccepted(Task<TcpClient> tcpClientTask) { TcpClient tcpClient = tcpClientTask.R...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617645", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Easy regular expression This pertains to a regex expression.If I have a document with the word Chapter in it how could I select the space right before it? A: \s+(?=Chapter) should do it. \s+ matches space, and (?=Chapter) matches the zero-length string that is followed by the word "Chapter". For .net, space is de...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I'm trying to create a database table for each user who registers. What am I doing wrong? I am trying to work on a login and registration page and I am making a new database and i can do it fine like this: mysql_select_db("my_db", $con); $sql = "CREATE TABLE Persons ( FirstName varchar(15), LastName varchar(15)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python read page from URL? Better documentation? I'm having quite a bit of trouble with Python's documentation. Is there anything like the Mozilla Developer Network for it? I'm doing a Python puzzle website and I need to be able to read the content of the page. I saw the following posted on a site: import urllib2 u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Firebird CASE statement inside stored procedure I was trying to use the case statement inside a stored procedure but I got "Token unknown" on it. case is not supported in stored procedure? Thanks A: As Andrei wrote, CASE is only available in SELECT statements. So the trick to use it is to select from some table whi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: glVertexAttribPointer needed everytime glBindBuffer is called? In OpenGL (OpenGL ES 2.0 in particular), is glVertexAttribPointer required to be called each time a new VBO is bound? For example: glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer1); glVertexAttribPointer(ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(vertexS...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617668", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: jQuery load: Loading a single file for many purposes? I have few select's which their content is loaded on DOM ready. It looks something like this: <select id="select1"> </select> <select id="select2"> </select> <select id="select3"> </select> <select id="select4"> </select> <select id="select5"> </select> and the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Animation and event questions in win32 (C++) I would like to create a small application which has two animated ellipses. One wanders around on its own using a custom function to determine its direction and behavior; the other is controlled by the arrow keys. When the two collide, there is an alert and the ellipses r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617675", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: About C# delegate/event processing I have a simple program that doesn't behave the way I expected it to behave. I was under the impression that both Method Signatures would run in the order of the Invocation List of the Delegate during the CallEvent() method and make the Test Property equate to 40. Hence: Test += ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617685", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: defer font-face fonts loading after document ready Is there any way to prevent fetching custom fonts before document.ready and load fonts after that? This helps making page page load time(the time browser spinner shows) A: You could try this: $(document).ready(function() { var font_settings = " <style type='t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Make Table Width 100% with Last Column Filling Remainder without squashing other columns content/width Is it possible to make a table (which will have dynamically created text) to have for example: table width 100% of the screen 5 columns last column is empty ( ) the first four columns have text and their width is d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617689", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Integrating semi dynamic website with a CMS Is it possible to integrate a semi-dynamic php website(which is technically made up of static pages sharing the same header, footer and sidebar) and a dynamic website(contact forms, polls, login, etc - made with either codeigniter, zend or yii)? If so, what's the best way ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JS/JQuery: I Can't get the loop right $(document).ready(function() { $("#main-rss-link").click(function() { $("#main-rss-link").toggleClass('on'), $("#subscribe-list").slideToggle(); }); var a = $("li.comment").attr("id"); var b = $("li.comment[id='" + a + "']"); var c = $("li.comment > d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to avoid ^C getting printed after handling KeyboardInterrupt This morning I decided to handle keyboard interrupt in my server program and exit gracefully. I know how to do it, but my finicky self didn't find it graceful enough that ^C still gets printed. How do I avoid ^C getting printed? import sys from time im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: The operation timed out – ASP I have a vanilla ASP app that runs on IIS 5.1. The below code in an ASP file causes the IIS throw the “Operation timed out” error. However despite of the error the process continues to run on the server at the background and eventually completes as expected. I increased the ASP Script t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ec2 security group settings, sftp and port 80 settings I have a Linux based ec2 instance on aws with prepackaged Tomcat7 and so far I'm able to: ssh into the instance from command line, connect to the instance FileZilla, sudo start/stop tomcat (tomcat is listening on port 80) All development administration on the pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617701", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make 100.02f - 100 == 0.02f being true in c#? It seems to be rounding problem. I have array of float[] and some operations over this array. I need to write unit tests for this functionality, but comparing expected values to the resulted values happened to be not a simple task taking into account this rounding...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: segmentation fault when erasing an object from a vector c++ So I am seg faulting when I run this function class vector <Record<value> >::iterator itr = records.begin(); for (; itr != records.end(); ++itr) { if (itr->isSelected()) { itr = records.erase(itr); recordSize--; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: jquery filter data from json similar to Excel pivot table I have created a complex pivot table in Excel and I want to do the same thing in jquery. I have converted the data to Json. I have been able to find examples of accessing the data and of using the formulas but I can't find examples of using drop-down menus si...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: how to change character limit of joomla user profile "About Me" field I am wondering how can I change the character limit of Joomla's user component "About Me" field. To find this field go to Control Panel, User Manager, select a user, and in the right hand side click over the "User Profile" panel and this text area...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617716", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Probing Dlls through Reflection in ASP .Net I have been trying to find more information on the technique of dll and exe discovery by way of writing programs using ASP .Net and reflection(?). I haven't been able to find anything. I know there are dissassemblers but I am not interested in running other tools and di...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: PHP script link the *last* files in a folder The way I have organized the reports in a particular folder on my site is fairly straight forward. First they all have the date, in big endian mode. This means the most recent report should be at the bottom. So, the reports are named like this 20110102China01 20110105Chin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: "Unrecognized configuration section" after adding Signature to Config File using SignedXml.ComputeSignature I have a Windows Forms application built using the .NET 3.5 Framework which self hosts a WCF service. The service & app function properly on their own. Concerned about having the address & binding info access...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Rails can't match the existed route First I rake routes to check all the routes and make sure it exists in my app. In my route.rb resources :user do resource :account resource :addresses end And now everything is fine so far. I got some path helper method. Such as user_addresses_path this helper method works f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617736", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to add third level nav in Ruby on Rails? New to ruby on rails, trying to get this url structure: /about /about/staff /about/contact /about/brazil /about/brazil/staff /about/brazil/contact When I do: rails generate controller about index rails generate controller about staff rails generate controller about conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: weird difference between int pointer and float pointer please see my codes below #include <stdio.h> #include <stddef.h> typedef struct _node { int a; char *s; }Node, *nodePtr; int main(int argc, char *argv[]) { char *str = "string"; /*str points to satic storage area*/ Node nd; nodePtr pNode = NULL; size_t offset_...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to query my DB with with javascript? I have a page which allows users to search for their locations using the google maps API, and I want to be able to search for places I have stored in my DB that are close to the searched location. So how can I query the DB on the fly and have the google map update? here is m...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to protect javascript variables from being manipulated when posting to server? I'm building a simple mvc application in ASP .NET and I would like to keep all the user data of a session on the client side, i.e. that at each time the page is loaded the variables restarts from zero (for example, points in a game). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617755", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: A function is not being called I got a CCNode subclass, and it eventually calls a function located on its parent. First, my class will do this: -(void)getTargetPosition { Battle *myParent = (Battle *)self.parent; position = [myParent getTargetPosition:@"ENEMY"]; } Where Battle is the parent (a CCLayer). And...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Length limit of array of characters My question revolves around the program shown below (environment is Mac Xcode). #include <iostream> int main () { char nameOne [5]; std::cin >> nameOne; // input: BillyBobThorton std::cout << nameOne; // output: BillyBobThorton char nameTwo [5] = "BillyBobThorton...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ActiveRecord::StatementInvalid: Could not find table I am trying to run users_test.rb file which just has test "the truth" do assert true end I do have a likes table, still I am getting this error. Why so? Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. ➜ chann...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: std::set constructor second argument error Codeblocks raises an error on this line : set<string,cmpi> m; Where the cmpi function is : int cmpi(string one , string two ) { one = toLowerCase(one); two = toLowerCase(two); if(two == one) return 0; else if (one < two ) return -...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Converting from IEnumerable to List I want to convert from IEnumerable<Contact> to List<Contact>. How can I do this? A: I use an extension method for this. My extension method first checks to see if the enumeration is null and if so creates an empty list. This allows you to do a foreach on it without explicitly ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "346" }
Q: Android audio reverb Sample App Is there any sample code for Audio reverb using PresetReverb class from 2.3 in Android ? MediaPlayer mMediaPlayer = new MediaPlayer(); mMediaPlayer.setDataSource(this, Uri.parse("/sdcard/music/sample.mp3")); PresetReverb mReverb = new PresetReverb(0, mMediaPlayer.getAudioSessionId())...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617778", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: showing live content like facebook? I was curious how facebook can show content live. For example, when one user comments, another person from somewhere else in the world can see that comment appear right after the user comments. I know ajax/jquery can do an .append(data) without refreshing the page, but that won't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617779", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Backlinking through Javascript What possible ways are there for backlinking through javascript based content? I know the crawler doesn't execute the scripts, but is there any other way possible? Regards, Mike A: Google publishes excellent guidelines on making AJAX applications crawlable at: * *http://code.googl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617787", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Move core plot x axis to last point My core plot graph in my iPhone app is drawing nicely. However, one thing I can't seem to figure out. How can I get the graph to scroll to the end of its x axis after the view loads, rather than starting at the origin? I would like the last data point upon the x axis to be visible...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make activity always on top on android? i make a lock screen application that prevent other people to access the device when it's locked. i have an activity called lockscreen activity. here's the code: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget....
{ "language": "en", "url": "https://stackoverflow.com/questions/7617798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Removing headers from jquery text() I need to get the text from a div with an id of mycenter, but I do not want the header text i.e. <h2>This is my Title</h2>. I only want the text after the header. Additionally, sometimes the div does not contain any header. I tried: var pageText = $('#mycenter').text(); This corr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using CSS3 multiple backgrounds with only one repeating I'm trying to use CSS3 multiple backgrounds: a top section (not repeated), a middle section (a 1px slice to repeat making the container "expandable"), and a bottom section (not repeated). The problem I am having is that the middle section repeats, covering bot...
{ "language": "en", "url": "https://stackoverflow.com/questions/7617802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }