text
stringlengths
8
267k
meta
dict
Q: Compile Attempt Gives crt1.o/'start'/undefined reference to 'main'/exit status message I am working from a book: TCP/IP Sockets in C and its website code. I am trying to build a client and server based on those files. My make gives lots of error related to not being able to find functions from DieWithMessage.c He...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there a better way of linking transitions in Corona Lua? I'm currently animating a trash can when something gets dragged and dropped onto it with this code: local trashUp local trashDown trashUp = function() transition.to( trash, {time=100, xScale=1.2, yScale=1.2, onComplete=trashDown }) end trashDown =...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Actual key assigned to JavaScript keyCode I have setup an event listener: editor.addEventListener('keydown', function(e) { if (e.shiftKey === false) { alert(String.charFromCode(e.keyCode).toLowerCase()); } else { alert(String.charFromCode(e.keyCode)); } }, false); When the user press...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542358", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you shrink contents to fit a div? I am on a project and I have been assigned the task of modifying a report page to make it printable. The report uses PHP to generate tables within divs, but the divs are sometimes greater than 1 page length on print. So, what ends up happening is the tables/divs get broken on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I update the project files using git effectively? I have an old web application 'A' which is a running under version control of git. I recently rewrote the whole structure, but wrote this in different place and this new files are not under version control of git. This new project is 'B' What is a best way th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL result set needs pivot display within asp.net/mvc3 webgrid or raw html table? What is the cleanest way to transform/pivot the following result set (top - raw data) and display/create in another view in a webgrid or html table (bottom - % of data) using razor? Hotels are going to be dynamic (added all the time). ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL wrap join condition with another condition? I've made a query that works as needed when there is at least 1 row in the url_status table where u.urlid = us.urls however it won't work if this isn't true. What could I do to overcome this? SELECT u.*, COUNT(*) AS historySize FROM host_urls u, url_status us WHERE u...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542373", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Asynchronous Plug-in in Dashboard Widget I'm building a Dashboard Widget where I use a plugin on native code to handle certain operations. The problem is one of those methods takes a few seconds and the interface freezes, so... It's there a way to do an Asynchronous method that can be called by the Javascript and th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java Dateformat -- Can I compare input to certain formats and parse the input based on the format that it is matched to? For example: A user can enter 01/23/1983 or 1/23/1983 How would I use DateFormat to write up two different kinds of formats like (MM/DD/YYYY) and (M/DD/YYYY) and compare them to the actual date ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Spring-JSF2 Integration: Target Unreachable, identifier 'customerBean' resolved to null I'm trying a simple integration of Spring 3 and JSF 2 using annotations only (not using faces-config.xml to define managed beans) and I'm stuck with an error. The error is: javax.el.PropertyNotFoundException: /customer/add.xhtml...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: vim: how to specify arrow keys In vim, when using map commands you must specify keys. For example <CR> <ESC> <F1>. What are the corresponding ones for the arrow keys? A: If you don't know the internal code for a certain key, type CtrlK and then the function key. For example, this sequence followed by the up arrow ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Get values from json_encode with jQuery I insert several(array) value with json_encode in one row from database table, now want echo they as order with jquery. This is output from my PHP code: [{ "guide": null, "residence": [{ "name_r": "jack" }, { "name_r": "jim" }, { "name_r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Good features of paths for machine learning I'm looking into ML problems (mostly density estimation and anomaly detection) with paths made up of coordinates (GPS). Other than the coordinates themselves and deltas (changes between adjacent coordinate points) and polar coordinates what are some other good features? Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Binary Search Tree Preorder Traversal I have a question regarding preorder traversal of binary search tree. I know what the algorithm has to be like, its pretty simple: void preOrder(Node node) { print(node); if (node.left() != null) preOrder(node.left()); if (node.right() != null) preOr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how can I align to middle by height I want to create image box(with image). It's ugly when text is in the top of box. How can I align text to middle? I tried to use vertical-align, but it seems, that it don't works Demo of my code EDIT: Your solution works fine with short messages. But if they will be multi-lined, i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Django auth context processor: not to query for user for each request I enabled django auth middleware, so now I have a user variable in my request context. In this case for each page request user object is queried from the database. Is it possible to set up this middleware to use a cached user object (for example,...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542388", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SQL Database design for huge datasets I have a customer that has the following data structure... for each patient, there may be multiple samples, and each sample may, after processing, have 4 million data objects. The max number of samples per patient is 20. So a single patient may end up with 80 million rows of d...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542390", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Convert array of unsigned char (byte) into unsigned short in C++ I have array^ byteArray and I need to extract bytes in Little Endian sequence to make unsigned shorts and ints. I've tried every combination of the following I can think of so am asking for help. int x = UInt32(byteArray[i]) + (UInt32)(0x00ff) * UInt32...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to implement hover effect that fades in when you hover over the left side (previous function) slides in and fades darker and vice versa for the right here's what I got so far thanks to Deleteman http://jsfiddle.net/pQzWp/ A: I would try to do the following: Inside the block element that holds the image, add two...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to extract classes out of Python modules? I'm trying to write a script that takes two Bots and then feeds them to an engine for them to play a game. As an example usage: $:python rungame.py smartbot.py dumbbot.py Detected SmartBot in smartbot.py... Detected DumbBot in dumbbot.py... Running game... The problem I...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I replace vowels in a list with underscore? I have a list of characters (basically a word) and I want to substitute the vowels in the word by underscore ['_'] and return a new list. eg: ?-sub([s,e,g,e,d],A). A=[s,_,g,_,d] My attempt built the new list in the reverse order then finally when it exited fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I know if a variable is private? I've never understood private variables. I know how to make them, (using the Module Pattern, right) but I don't see what's so private about them. I illustrated an explanation on jsFiddle -- http://jsfiddle.net/fufWX/ Can you explain how that _private variable really is private...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Generating news from db table I'm trying to generate news from db table. My table look like that And the function that generated news from db table function generateNews ($lang, $db) { $title = 'title_' . $lang; $short = 'short_' . $lang; $detailed = 'detailed_' . $lang; $result=$db->query("SELECT i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Cannot run background process on Amazon Linux Instance, but runs on MAC OS X I cannot run a background process in Amazon Linux instance, but The same runs on Mac OS X I'm trying to run a php script thru cmd line. It runs fine on Amazon Linux, if I dont append & character at the end. If i append &, it is having a T a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542416", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Python Challenge #2 - For loop problem Python Challenge #2 Answer I found FILE_PATH = 'l2-text' f = open(FILE_PATH) print ''.join([ t for t in f.read() if t.isalpha()]) f.close() Question: Why is their a 't' before the for loop t for t in f.read(). I understand the rest of the code except for that one bit. If I tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: set JList icon with DefaultListCellRenderer? The code below is supposed to get the default directory icon from the JFileChooser and then use that icon in my custom "Recent Directories" list which is provided as an accessory to the JFileChooser dialog. Can someone please explain why the below code does not work (part...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to organization JavaScript code in project for maintainability? Am primarily a PHP developer, but of late I've being playing with alot of JavaScript, mostly in jQuery. The problem is that the code is getting harder to debug and this made harder because I have event listeners littered across the HTML. The code ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: playing a video on the page in silverlight I looked around on google and I'm not so sure what would be the best (in my case, fastest to build) way to have a video file that's on the server (what format should I store it in? wmv?) play on an aspx web page using .net 4. I'd like to use silverlight with this snippet th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542425", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: inotify and bash I am trying to make a bash script with inotify-tools that will monitor a directory and alter all new files by removing lines containing "EE". Once altered it will move the files to another directory #!/bin/sh while inotifywait -e create /home/inventory/initcsv; do sed '/^\"EE/d' Filein...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How to unpublish an Akka Camel consumer? My Camel consumer actor won't get unpublished after I sent a message to it. This prevents the application from shutting down. It works if I just start and stop the actor without sending any messages. What am I missing here? Example code: import akka.actor.Actor import Actor._...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Referencing an id from separate XUL files If I have two different XUL files, is it possible for the javascript in one to reference a XUL id that is defined in the other? I want to use javascript in a separate xul file to edit the XUL in another one. A: You can do reference any JS files inside a XUL file & It will b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Convert Ruby JSON Date to Objective C NSDate I have a Ruby service which receives a JSON date like this: /Date(1311706800000-0500)/ I need to format it in a way so that it can be read into an Objective C NSDate. I have tried to use: seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i return Time.at(seconds_since...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Objective-C checking if URL exists in Command Line application I have a simple command line application to test the presence of files. The files are very large, however, and I would like to check that they are there without downloading the whole file. This is what I have but it downloads each file: NSURL...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Stripping non A-Z characters in vector in R I have a vector of usernames that have non A-Z characters in them. I want to be able to strip those characters out. I was told to use letters vector but y =x[letters] doesn't seem to work. Thanks A: If x is your vector, use a simple pair of range regexes with gsub and rep...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542447", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dividing variables in Objective-C so I need to divide on variable by a number. How can I do this? I know about the C functions of DIV and MOD, but do not know how to use them in objective-C/cocoa-touch. Heres an example of my code. // hide the previous view scrollView.hidden = YES; //add the new view scrollViewTwo....
{ "language": "en", "url": "https://stackoverflow.com/questions/7542450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Issues accessing nested JSON objects via javascript/jQuery This is the JSON i'm getting: {"status":"failure","msg":{"name":["can't be blank"],"email":["can't be blank","is invalid"]}} This is the javascript i'm using: $("#sign_in_form").submit(function() { var success_function = function(data) { if(data.statu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iPhone - Storing a double value into a NSDictionary with only 7 decimals as a Number type I have a PList that contains a dictionary with some decimal values like 10.1234567, stored as Number type (tag ). In my app, I read that plist and manipulate those values as NSNumber (double type values) with a custom class and...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542452", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how to convert lighting effects in psd to xhtml? i have a psd that i am converting now to xhtml. the design is great and the coding is fun but the psd is full of lighting effects layers. each element in the page (header,footer,content,buttons and menus) has at least 2 lighting effects which is basically a white brus...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cleaning/Compacting multiple states represented by boolean variables In an implementation, i have a lot of states, represented by boolean variables, in such a way that when a state is true, variable against that state is true, and many or all of the others are false. It is not a good way, and since i was only planni...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I force "Compatibility View" ON in IE9 on a page with a proper Doc Type? I have a site that is nearly all standards compliant, and expects to be that way across all browsers. However, I have a specific page on my site that I want to render in a standards compliant way in Firefox, Chrome, Opera, and Safari, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542456", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Program to Restrict User Access I have had this project in mind for a while but have had trouble on how to go about doing it. What I want to code is a security application that will temporarily restrict the access of the user to just one or two selected applications. Let's say you're bringing your laptop to a situat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: Need advice for development of a graph based simulation engine Here in my university they have developed a java based application for visualizing graphs and manipulating them, something similar to GUESS but somehow with different capabilities. the website hosting the project is graphlab.sharif.edu but the server is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Week of the month I am trying to get the week number of the month and this is what I am trying to do: x=`date +"%V"` echo "x is $x" y=`date +"%V" -d $(date +"%Y%m01")` echo "y is $y" week_of_month=$((x-y)) echo "week_of_month is $week_of_month" and this is what I get: x is 38 y is 38 week_of_month is 0 But if my s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Unable to open URL stream The code below is for a Google App Engine project. Why do I get a Stream Closed error without seeing any line returned? I am definite that the page the URL points to is active. URL url = new URL("http://banico.com.au"); BufferedReader reader = new BufferedReader(new InputStreamReader(url.o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: php not sending email? I'm on a godaddy hosting account and my emails were sent fine until today. It seems as though all the emails form my site stopped sending. <?php $to = "myemail"; $subject = "Client Question"; $msg = "From: {$_POST['name']} \n Email: {$_POST['email']} \n Phone: {$_POST['phone']} \n Msg: {$_POST...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: MFMailComposer -- Attach Image with HTML ON I am trying to send an email with an image attachment and HTML turned on. The problem is that when HTML is on, the image appears inline instead of as an attachment (I use gmail). If I set isHTML:NO then the image properly shows up as a downloadable attachment. How can I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the common use cases for __IPHONE_OS_VERSION_MAX_ALLOWED? What are the situations in which you would use the __IPHONE_OS_VERSION_MAX_ALLOWED check? What about __IPHONE_OS_VERSION_MIN_REQUIRED? A: It's important to understand that these are compile-time constants, they are therefore not useful for detecting...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: help with first jquery plugin: problem with ajax() I'm experimenting with building a jquery plugin but need some help. I'm getting the following error in firebug: Node cannot be inserted at the specified point in the hierarchy this error popped up when I tried to implement an ajax request for populating a div. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542481", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: OpenGL Framebuffer, drawing to texture We have a hard time figuring out rendering to texture using framebuffer objects. We have managed to draw our texture unto another texture, but the texture isn't centered. If we set the the texture size to correspond to the window size, it's centered, but we want to be able to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: continued drop down boxes until I am looking for my script to accept a percentage in a drop down box, after the initial selection I want to calculate the remaining percentage and present the user with another drop down box, this would continue until there was a value of 0 left in the last box here is my code so far...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Changing the iOS keyboard animation time Is there a way to change the time the iOS keyboard animation takes? A: I've actually found a better solution. What you can do is programmatically make the textfield or textview a first responder within an animation with duration of your choice. Example for making the keyboar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542495", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Galleria not clearing caption I am using Galleria and extending it to show the caption's created from image alt attributes. It works great, however if I choose to have no caption on one image, the caption from the image before is still visible, I notice also that the Galleria info container, where I get my captions ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make my 'sessions' to never expire? I'm using Zend Framework. I want to do something similar to SO, when you are not a registered user, you keep your account as long as you remove all your cookies. I know that session <> cookies, however what will be the best way to do that? By the way, I'm using memcached be...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: spring PropertyPlaceholderConfigurer and context:property-placeholder I have following bean declaration: <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="locations"> <list> <value>WEB-INF/classes/config/properties/databas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: "Application not installed" after reinstall sometimes When my app is installed on the Android and I want to update it, if I don't uninstall and then reinstall, sometimes an install over top of what's there works, sometimes it doesn't. I have no idea how it decides whether to allow the install or not. There is no err...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Re-architecting MySQL Indexes I have to re-architect the index structure because of previously bad index design. I have some 200 tables with a few thousand up to 20 million rows per table. It would take days to manually remove indexes and create new indexes on the life system. So here is my thought: * *I erase t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to make sure the size of a floating point is the same across platforms? I'm writing software that has to work on different platforms. It uses floating point numbers. On all platforms, the floating point numbers have to be the same size in memory. For integers I could use int32_t for example. How can I do this fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Call a stored procedure with parameter in c# I'm able to delete, insert and update in my program and I try to do an insert by calling a created stored procedure from my database. This button insert I made works well. private void btnAdd_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnectio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "167" }
Q: Multilingual drupal sites and... tag filtering? I'd like to build a multilingual site and I am quite new to drupal, I was wondering if I could proceed in the following way: I could tag my entries with the world "english" and "italian", then I could display pages only with such tags to filter my site... Generally spe...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails many-to-many foreign key validation? Newbie question. I would like to add a validation step to my joint table model to make sure that an object of that type cannot be created without the two tables being joined containing the rows being references. For example: class Appearance < ActiveRecord::Base belongs_t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: read irregular file into a 2-dimension array using C++ I am very new to C++. I believe there are solutions already in stackoverflow but I cannot find any. I need to read data from a txt file into a 2 dimension array. File is like 54 3 5 678 10 1 2 3 46 8 1 1 2 3 4 9 8 10 Each line contains up to 120 integers and t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Passing an array to a function and then changing the values? Basically, let's say I declare an array in int main() and then pass it to another function, can i then change what values the array holds? Something like: int main() { myarray[3] = {4, 5, 6}; myfunc(myarray); return 0; } int myfunc(int myarray[]) {...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: iPhone - ASP.NET : Resume download of files Hihi all, I would need to create a restful json wcf webservice method with .NET and c#, this webservice method will take in a couple of information to perfome some checking and validation. Once the validation is completed, it will access the protected azure blob storage to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: addEventListener with inexplicable undefined method error I couldn't find an answer to this problem I've been having. function UploadBar() { this.reader = new FileReader(); this.reader.addEventListener( "onloadstart" , function(evt) {alert("Hello World");} , false ); } when I tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to read in a JPG image into a 3 matrices: red, green, blue? What is the process to read in a JPG image into a 3 matrices (intensities): red, green, blue? A: you could search for a relevant class in the java api this might help: http://download.oracle.com/javase/6/docs/api/java/awt/image/ColorModel.html
{ "language": "en", "url": "https://stackoverflow.com/questions/7542539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I apply the JavaScript method on my Facebook page? I found this code, and I need to display it on my page: <script language="javascript" src="http://www.joshuaproject.net/upgotd.php" type="text/javascript"></script> <!-- alternative for no javascript --><noscript> <a href="http://www.joshuaproject.net/upgotd...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542541", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: XMLHttpRequest for JSON file works perfectly in Chrome, but not in Firefox I've narrowed my problem area down to the function below. It's part of a userscript I'm writing. It works perfectly in Chrome, but doesn't work at all in Firefox/Greasemonkey. I've tinkered with it all day and have hit a brick wall. The only ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542542", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: use git's word-diff for latex files I would like to have git diff outputs me regular diffs for all files, except *.tex. For *.tex files, I would like to see the output of git diff --word-diff. I was playing around with .gitattributes and .gitconfig, but the furthest I got was to get a partial display for one .tex fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I collect signatures from site visitors? How would I go about collecting a signature from a site visitor? I am building my site in PHP and would like to give the user the ability to add their signature to a form. They can use their mouse to draw the signature. The signature would be compressed and added to t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: When to split an MVC view into two? I discussed best practices in MVC the other day with a colleague and he asked me how to best separate views. He was maintaining an MVC solution which had a common input form with a controller with two actions, a get action, and a post action. Both actions were returning the same v...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: MySQL: create function that returns an array CREATE Function getNearIds (myLocationLon double, myLocationLat double) RETURNS WHAT I just want to return an array of integers, after a long search: some say use Group_concat to make the list as a comma separated list then use find_in_set when calling the function. this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use SetArrayRegion to map an array from a C struct to Java class array? I want to access data members of a C struct(below) and map them onto an array in my java class. I have tried to used Set<>ArrayRegion to map the values but I am going wrong somewhere. Below is an example of what I am trying to do. Can s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542550", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Saving int/byte/string data types in Android Sorry, this might be quite a lengthy question, but how do i actually save int/byte/string data types in Android? I do know that to save a String into the internal memory (note, not external or anything else), i have to do something like this: String FILENAME = "hello_fil...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542557", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Disadvantages of using Basic4Android? I am currently researching the pros and cons about Basic4Android. I have a good list of pros (http://www.basic4ppc.com/android/why.html) but what are some disadvantages to using this? What limitations does this tool have? Thank-you for the help! A: After trying virtual every pl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542560", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Right align 3 div's to the right of the page I'm trying to right align 3 div boxes in the order signin_box - signin_btn - signin_opt. My current code is swapping signin_opt with signin_box. I know I can just swap the placement in the HTML code but I want to learn how to float the correct way. .container { border...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542563", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: UInt64 on a 32 bit system, need to generate from UInt32's or array of bytes, how? To generate UInt64 the following results in "warning C4293: '<<' : shift count negative or too big, undefined behavior" UInt64 byteArrayToUInt64(int %stI, array<Byte>^ byteArray) { UInt64 retV = byteArrayToUInt32(stI, byteArray); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to send parameters to a selector? I know to send a parameter to a selector, we use withObject, but how to handle the following case: UIBarButtonItem* backButton = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:[[NavigatorUtil new] autorelease] action:@selector(back:) ]; T...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: recursive stack size? class Program { static void Main(string[] args) { Test(0); } static void Test(int i) { if (i > 30000) { return; } Test(i + 1); } } Why getting recursive function and throwing StackOverflowException when calling this...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to send a 2-D array as a reference in C++, and back? yet another beginner-to-intermediate question. I'm trying to pass a 2-D array to a function in C++. I'm aware that the array can't be sent directly to the function, so I first created a pointer (names edited but you'll get the idea): double input[a][b] = {{0, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Rails/ActiveRecord has_many question I am using Ruby 1.8.7 and Rails 2.3.5 So I am trying to figure out why my has_many association doesn't work properly. I have 2 tables in the database, Videos and Comments. Inside the Comments table I have a foreign key of video_id column and when posting a comment nothing shows ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Display results after form has been submitted When I submit a form with PHP that updates a column in my database, it doesn't display the updated data until after the page has been refreshed. For example, say I want to delete the word watermelon from the following list: apple, banana, watermelon, peach I would have a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PDO security and html special chars? Does PDO by default use html special chars? Or even better can I turn it on or off using php, I cannot find any documentation on whether this is possible or not? Just to clarify, if using prepared statements I am nearly invincible to injection? A: Does PDO by default use html s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: new FormData() "application/x-www-form-urlencoded" Couchdb only parse application/x-www-form-urlencoded. Is there a FormData() attribute that set the enctype? xhr.open('put',document.myForm.action,false) xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded') xhr.send(new FormData(document.myForm)) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Export user controls in vb 2010 to a text file Is it possible to export the user controls properties from my VB project to a text file or to excel. I have tried google ,but today google isn't my friend. I am using VB 2010 express thanks A: I think you are looking for something like this: Const path = "C:\Test.txt" ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Implementing Undo & Redo in the controller/view I'm using paper_trail to implement versioning in my Rails app. I've run into a bit of a head scratcher when tying the back end into my front end. Since I allow users to update record (create new versions) via AJAX, the "undo"/"redo" functionality has to be tied to the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Non-repeating random number generator? I created a trivia game using visual basic for applications (Excel) that chooses questions by going through a case statement where the cases are numbers. I have the program randomly select a number from 1 to the max amount of questions there are. Using this method, the game rep...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why doesnt this give me a border on each side of green? I have this page which has this this CSS body { background-image: url("images/BACKGROUND5.jpg"); background-repeat: no-repeat; } and two divs #borderleft { background: none repeat-y scroll 0 0 #93A87D; clear: left; float: left; margin-left: -10px; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UIScrollView changes content offset on presentModalViewController A UIScrollView in my view hierarchy is acting funky whenever I present a modal view controller above it. It automatically adjusts the content offset and moves my content down about 40 pixels. I can't seem to figure out how to stop this. After snoopin...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: iOS: Tapping on Facebook app login does not bring up allow/don't allow options for my app Problem: I run the sample iOS SDK code for facebook connect. When Facebook app is not installed, the sample app authenticates through Safari just fine and the sample app is able to post successfully. When native Facebook app i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I parse a string representing a sequence of arithmetic operations? I am working on a personal project and I want to take in userinput that looks like this : 1.0+2.5+3--4 and format it to something like this : 1.0 + 2.5 + 3 - -4 so far I am using the .replace("+") to .replace(" + ") and doing that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I return the address of a node? I want to return the address of a node after I find it. The node object class is inside a tree class set as private (private is the node inside) I'll show you a function that's very similar to what I want but with a bool return type. It returns true if the node exists within th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542630", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: PHP print from database without 'while' I need to print one row from a table so a while loop isn't necessary, is there any other method? A: You need not while. Just do your while condition outside while 1 time. i.e $a=mysql_fetch_row($sql); //use $a instead of while($a=mysql_fetch_row($sql)){ //use $a } A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542632", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Fetch a large chunk of data with TaskQueue I'd like to fetch a large file from an url, but it always raises a DeadLineExceededError, although I have tried with a TaskQueue and put deadline=600 to fetch. The problem comes from the fetch, so Backends cannot help here : even if i'd launched a backend with a TaskQueue, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to format text in php when we have 2 or more options I'm trying to make a simple script that allow formatting text and submit it. Here is the form: <html> <head> <title> </title> </head> <body> <form method="post" action="step2.php"> <input type="text" name="text" /><br> Red<input type="radio" name="Red" /> <b...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: rails3.1 ActionController::RoutingError (No route matches [GET] "/images/up_arrow.gif"): My stylesheet has: .asc { font-size: 2em; background-image: url(/images/up_arrow.gif); } .desc { background-image: url(/images/down_arrow.gif); } The font-size works but the background image (arrow) doesn't. I get Action...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542655", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: UIScrollView inifinite scroll without paging first question here, be nice :P I am trying to make an infinite UIScrollView (i used the "StreetScroller" apple demo project). When the UIScrollView is almost at the end of the contentSize, the contentOffset is set to the center of the contentSize and all the subviews are...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542656", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Apache mod_rewrite doesn't match URL containing percent symbol If the rule: RewriteRule myurl /newurl Matches: http://localhost:8080/test/xxxmyurlyyy Why doesn't it match this? http://localhost:8080/test/xxxmyurly%EDyy EDIT: I've just discovered utf-8 encoded works just fine. If I rather use %C3%AD than %ED it's ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to use the vst sdk on the .net framework I like making music using mostly my computer and especially love using synthesisers. There is a wide range of synthesiser plugins available online which are quite awesome. I have downloaded the VST (Virtual Studio Technology) SDK which is the platform that most plugins I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542659", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can we post Actions on an object outside of the app (ie FB Page, FB Place)? Is it at all possible to post an action (owned by the app) to an object (NOT owned by the app)? Specifically on Faceook Page and Places, objects owned by FB. For example I want to create an action called "shop", so that I can create the acti...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can jQuery Galleria.js load non-image file types, e.g., .html files or other content types such as HTML5 Video? I'm wondering if galleria.js, http://galleria.aino.se, can load HTML pages or just images (.png, .jpg, .gif)? I tried just plugging in an .html file but it didn't work, was wondering if loading html files ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7542663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }