text
stringlengths
8
267k
meta
dict
Q: Get width from the center of an element to the edge of viewport Essentially the idea is to make Element-B and Element-C to cover the area horizontally starting from center of Element-A and ending at the edge of viewport. So, I guess i want to get the distance value from the center of Element-A to the edge of viewpor...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: how i can change the master page at runtime I want from my website to change its master page dynamically every postback . i wrote this code protected void Page_PreInit(object sender, EventArgs e) { if (IsPostBack) MasterPageFile = (MapPath(this.MasterPageFile) == MapPath("MasterPage1.master"...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Menu loading off-screen in Internet Explorer I am in the process of writing a website for my sister, and I'm running into a little trouble with cross-browser compatibility. Namely, the menu I am using is loading half off-screen in Internet Explorer, while it looks fine in Chrome. I've tried messing with the alignmen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: ODBC: Data source name not found and no default driver specified I'm trying to make a connection to a sql server on a local lan but I keep getting the following error, sqlTest: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified java.sql.SQLException: [Microsoft][ODBC Driver M...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548831", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: iOS CSS opacity + visibility transition Take a look at the following test in a desktop browser (JSFiddle): a { background: gray; display: block; margin: 100px; padding: 100px; } a span { opacity: 0; -webkit-transition: 0.5s; visibility: hidden; } a:hover span { opacity: 1; -webkit-tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What are the most important things to do to make a safe PHP/MySQL website? This is a bit of an opinion question, but overall, what safety precautions would be ideal for a PHP-based website using a MySQL database? This site would include registration and login, and need to protect users' personal information. A: You...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548839", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Round a double to 3 significant figures Does anybody know how I can round a double value to 3 significant figures like the examples on this website http://www.purplemath.com/modules/rounding2.htm Note: significant figures are not the same as decimal places A: double d = ...; BigDecimal bd = new BigDecimal(d); bd = ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Character encoding cross-reference I have just migrated a database containing Latin American place names from MS Access to my MySQL. In the process, every instance of á has been changed to ‡. Here is my question: Does there exist some sort of reference for looking up which character encoding has been translated to w...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: 2 jcarousels influencing one another I have 2 jcarousels: First that acts like thumbnails limited to 4 Second that shows big image, only one when clicked on the thumbnail the second jcarousel scrolls to the appropriate image, now that i manage to do. the second jcarousel has prev/next buttons, when clicked it will s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Binding on RotateTransform Angle in DataTemplate not taking effect In my WPF UserControl I have this resource, please observe the comments in the Xml sample. <UserControl.Resources> <DataTemplate x:Key="AxisXLabelTemplate"> <ContentPresenter Content="{Binding Path=Content}"> <ContentPresenter...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Rails remote form loaded via Ajax after document ready is not submitting I have a remote form using form_tag and :remote => true that is loaded from a partial. When I load the form through its own view as normal, it works as intended. However, then I try loading the partial on another page through AJAX after documen...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548852", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Problem with echo values from database I inserted on a row of database table values, now I want echo them with json_encode, but I have following error: PHP: $name_tour = $this->input->post('tour_name'); $query = $this->db->query("SELECT * FROM tour_foreign WHERE name LIKE '$name_tour' ORDER BY id desc"); $data ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to get the email and name from Azure ACS? I'm using the Azure ACS, and I've been looking for away to get the email and name from the SAML 2.0 response or something. But I dont see any options for it, I redirect the user to localhost:8000/acc/completesigninup/ There I have the XML from the FormCollection object, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Identifying start and end XY vector of characters on image I'm trying to recollect some information about letters to start some kind of OCR with Neural Networks. I've yet to really join all the things together, however, the problem I'm having right now is how to differentiate characters and separate them. Something ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548874", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: TextBox within DataTemplate, on GotFocus cannot assign SelectionStart? I have a logic with my textbox which says, on focus move the selection start to the last character, so that the editing person can just continue writing. This worked perfectly with this: private void TextBox_GotFocus(object sender, EventArgs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Join results from multiple MySQL tables and output with PHP Using PHP, I'm trying to populate an HTML list with data from two different tables in a MySQL database. The structure for each table is as follows: Table: "students" +------------+------------+-----------+---------------+-------+ | student_id | first_name |...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548884", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: inet_ntop provides different returns for the same ipv6 address on different platforms On my Mac, inet_ntop produces this IPv6 address for a certain 128-bit value: 2001::53aa:64c:422:2ece:a29c:9cf6.51391 On my FC15 Linux system, I get this IPv6 address presentation: 2001:0:53aa:64c:422:2ece:a29c:9cf6.51391 My under...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Virtualenvwrapper.sh functions not available in bash shell I'm doing a new install of virtualenvwrapper, and for some reason after running virtualenvwrapper.sh it's functions aren't available. $ virtualenvwrapper.sh creating..... $ workon workon: command not found I know that it's running, aside from the successful...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I toy with this .py file? I'm learning Python just so I can tinker with the files from AIMA easily. I know Java and C++, but I find the AIMA code on the repositories to be too obfuscated. The Python code looks simpler and more elegant...yet, I don't know Python. I wanna import the functions in search.py. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I check in C++ whether std::cout is redirected to a file? I need my program to behave differently, depending on whether the output is to a terminal or to a file. How can I find this out from within C++? I assume there is no solution that works for all operating systems. For my purposes, it would be good to h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: hg update --mq not working? I am using: Mercurial Distributed SCM (version 1.9.1), and I've done the following: D:\code\mqtest>hg init D:\code\mqtest>hg qinit -c D:\code\mqtest>echo NonQueue > first D:\code\mqtest>hg st ? first D:\code\mqtest>hg add first D:\code\mqtest>hg commit -m nonqueue D:\code\mqtest>hg log ch...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: It's possible to upload a movie via php sdk? How can i do it? i tried something like $facebook->api('/me/movies','POST',array('source'=>..)); but it didn't worked. A: see this howto: http://developers.facebook.com/blog/post/493/ A: Accessing /me/movies is a list of the movies that the user likes. Things that the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548898", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Updating .JAR's contents from code I am making a game that needs to be updated. I have two JAR files: Update.Jar and Game.Jar Basically, I want to be able to modify Game.Jar without completely overwriting it. I want to: * *Open the Jar file as a Zip file from within code *Replace/add some resources *Repackage t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Embedded IP stack: is it okay/accepted to have asynchronous sending? I am trying to implement a very small IP stack for 8-bit AVR MCUs. I don't want it to support TCP, because it's really too big and I don't need it, but rather UDP (and, of course, ARP and ICMP). I want the stack code to fit into 16 kiB of ROM and 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548903", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Will the timezone used in MySQL Date and Time functions cause conflicts/issues? I have a website which allows visitors to view content, and has the option for them to register and login (which gives them permission to submit content). * *Whenever content is submitted by users I do a INSERT INTO query in the conte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ruby on Rails highlight current link on navigation bar? Can anyone tell me how to highlight (with color) the current link on a navigation bar, using css? I don't want to use the controller option. Here is the code from shared/menu.html.erb: <div id = "navigation"> <ul> <li id="menu"><%=link_to "Menu", menus_p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Opening a epub file on a UIWebView Xcode Open File (epub) with xcode programming - NOT OPENING (O just see a little white block on upper right) I have also added epub file in project, I am using following below code to open it in viewdidload method. - (void)viewDidLoad { NSString *filepath = [[NSBundle mainBundl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: c++ win32 how to store persistent data I'm developing a c++ win32 application and i would like to implement persistent storage into it. I know I can use filesystem or a database or the registry, but what would be the best way for storing a: boolean unsigned int wchar_t [256] boolean [15] I need to read/write f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548916", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Fastest way to retrieve data from a database in .NET? Using ADO.NET, what is the fastest way to retrieve data from the database and populate the data into my business objects? Which one should I use? DBDataReader , DBDataAdapter, or any other classes? Is there a way to make this process automated? Let's say based on...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548921", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best practice for combining table data in MySQL? I have a list of people in a table that are associated with one or more projects, presumably stored in another table. My question is, what would be the best practice for setting this up? Each project needs to have a post of its own, the same goes for the people as the...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Git "error: The branch 'x' is not fully merged" Here are the commands I used from the master branch git branch experiment git checkout experiment Then I made some changes to my files, committed the changes, and pushed the new branch to GitHub. git commit . -m 'changed files' git push -u origin experiment Later on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "387" }
Q: Rails 3.1 ActionMailer Custom Template Path? Is it possible to customize the template path for Rails 3.1 ActionMailers? By default, Rails looks in: /app/views/[mailer_class] for the mailer view templates. However, I'd much rather organize them in: /app/mailers/views/[mailer_class] or at least: /app/views/mailers/[...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Python 3 concurrent.futures socket server works with ThreadPoolExecutor but not ProcessPoolExecutor I am trying to create a simple socket server using the new concurrent.futures classes. I can get it to work fine with ThreadPoolExecutor but it just hangs when I use ProcessPoolExecutor and I can't understand why. Giv...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Handle WIF SignInResponseMessage (Post) when user requests action method with both [HttpGet] & [HttpPost] overloads] I thought the solution to this would occur to me as I've sat on this problem for many months - but my brain has not flags the obvious best approach. I have two controller methods say "Edit" that are p...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548932", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can devise sign_in() test helper accept a new_record? In the following example, can I use build() instead of create()? class UsersControllerTest < ActionController::TestCase setup do @user = Factory.create(:user) end test "admin can get index" do sign_in @user get :index assert_response :su...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548934", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: problem with execjs doing michael hartl tutorial on windows... ExecJS::RuntimeError in Users#index I'm new to ruby and rails and walking (crawling?) through the tutorial. the second project uses scaffolding to create a user that consists of a name and email address. when i try to view the users screen I get the fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Force php to display number as 0.000001 instead of f 1.0E-6 I want to force php to output the number as a decimal number, not 1E-6. Is this possible? A: Use printf: printf("%0.6f", $var); Alternatively, sprintf returns a string rather than printing directly to the output.
{ "language": "en", "url": "https://stackoverflow.com/questions/7548941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ImageMagick compare not returning anything to php shell_exec() I want to compare two images using Image Magick. For this I am using following command in windows command prompt compare -verbose -metric mae image1.jpg image2.jpg difference.png This command compares image1 and image2 and prints the resultant output to...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to show a status dialog while parent form is closing I have a WPF app that takes a while to close so I want to add a 'please wait' dialog to show up while the main form is closing. However, when I added 'formmessage.show' to my main form's closing event handler, the form displays but instead of the 'please wait'...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Wrong Date from string returns from formatter! Why? I have problem with NSDateFormatter I converting date from picker in one view `NSDateFormatter *output = [[NSDateFormatter alloc] init]; [output setDateStyle:NSDateFormatterMediumStyle]; [output setDateStyle:NSDateFormatterShortStyle]; [output setDateFormat:@"yyyy-...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Enable new permission dialog How to enable the new oauth permission/install dialog? Any actual url will be helpful. A: Apps Dashboard > Edit your App > Settings > Advanced > Migrations section > Enable "Enhanced Auth Dialog" A: It may be because you're testing with a Facebook account that isn't logged as a develo...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails dynamic content in jQuery qTip2 I got my jQuery qTip2 working but I have one last thing to solve: getting dynamic content to display as a link in the tooltip. (I'm new to all this so please bear with me.) Here's what I have now to get the qTip to show: $(document).ready(function() { $('span[title]').qtip({...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: c++ to java conversion, a few questions I am converting a some C++ to java and have a small bit that I am unsure about first question is what is tested for in the line if (ampconst[i][0] || ampconst[i][1]) this in an example to the data in the array. static short ampconst[NUT_SERIES][2] = { {0,0}, {0,0}, {46,-24}...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SQL find and replace text I'm working on updating an existing wordpress database and everything is going smoothly. However, the links are still directing to the old site. Is there any way to use a loop or something to run through every record and update http://OLD_URL.com to say http://NEW_URL.com? I might just be t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to display only triangle boundaries on textured surface in vtk? I want to display a surface which is textured. I want the triangles boundaries to be visible over the surface in a different color (lets say red). I have found the following code from the vtk code samples but it does not display the triangle boundar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Format output to 40 characters long per line I'm fairly new to Ruby and I've been searching Google for a few hours now. Does anyone know how to format the output of a print to be no more than 40 characters long? For example: What I want to print: This is a simple sentence. This simple sentence appears on four lines....
{ "language": "en", "url": "https://stackoverflow.com/questions/7548968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: ROR deprecation warning desert-0.5.4 So I am getting this error: DEPRECATION WARNING: ActiveSupport::Dependencies.load_paths is deprecated, please use autoload_paths instead. (called from load_paths at /opt/local/lib/ruby/gems/1.8/gems/desert-0.5.4/lib/desert/manager.rb:36) times like a million after call ruby s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Mock/Stub constructor I have the following code: class Clients constructor : -> @clients = [] createClient : (name)-> client = new Client name @clients.push client I am testing it with Jasmine BDD like this: describe 'Test Constructor', -> it 'should create a client with the name foo', -> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C++ handling specific impl - #ifdef vs private inheritance vs tag dispatch I have some classes implementing some computations which I have to optimize for different SIMD implementations e.g. Altivec and SSE. I don't want to polute the code with #ifdef ... #endif blocks for each method I have to optimize so I trie...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548975", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Image align with text -CSS/HTML I need your help - I have this CSS and HTML; I need the text to align to the right of the image. But for some reason, they keep pushing to the bottom of the image. What I'm looking for infact is to have the details next to the image in a grid from left to right. Here's my code <html> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Problems with XSLT and apply templates I'm going to be brief. I'm doing XSLT on the client. The output is a report/html with data. The report consists of several blocks, ie one block is one child element of root-node in the xml file. There are n reports residing in n different xslt-files in my project and the report...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Ignoring mass from welded joints in box2d What I have is a circle that rolls over other objects and 'picks' them up. My current setup uses WeldJoint to join and place the picked up object at the circle's edge. I then edit these object's fixtures to become a sensor to avoid collision response. The circle is pushed ar...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Node.js tcp socket server on multiple machines I have a node.js tcp server that is used as a backend to an iPhone chat client. Since my implementation includes private group chats I store a list of users and what chat room they belong to in memory in order to route messages appropriately. This all works for fine ass...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: The object assignment doesn't make sense in PHP OOP I was tested and I got this wrong but this doesn't make sense: class myClass { public $x; function myMethod() { echo $this->x; } } $a = new myClass(); $a->x = 10; $b = $a; $b->x = 20; $c = clone $b; $c->x = 30; $a->myMethod(); $b->myMethod(); $c->myM...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548990", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: .htpasswd without .htaccess I would like to protect a web folder via .htpasswd. However, as the .htaccess file is under version control, I would prefer to not mess with it. Instead, I would like to have the configuration in /etc/apache2/sites-enabled/mysite /etc/apache2/.htpasswd Any idea what I need to put in the "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548992", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the "Ruby way" to align variable assignments? (code style question) Say i have this untainted code: some_var = Hash.new some_var[:name] = "blah" some_var[:address] = "101 blahblah lane" another = "Olly olly oxen free!" What is the ruby way of making it pretty? option 1: Leave it as is option 2: Align relat...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: NC flag in htaccess causing Internal Server Error Whenever I add the [NC] flag in .htaccess, it causes an Internal Server Error. This works: Redirect 301 /gabf http://www.mydomain.com/category/gabf but this doesn't: Redirect 301 /gabf http://www.mydomain.com/category/gabf [NC] How can I allow things like /gabf, /GA...
{ "language": "en", "url": "https://stackoverflow.com/questions/7548998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make whole table cell clickable but vertical align text inside it - CSS How to make whole table cell clickable but vertical align text inside it. Alright it is achievable by making link display:block and setting line height. But the problem is text may get 2 lines some times. So this way is not solution. Are ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Redmine internal error I get an internal error trying to access "My account" in Redmine. But after reloading the page there is no internal error and I can access the page. Here is the information from Redmine log: Processing MyController#account (for 91.90.15.48 at 2011-09-26 01:10:20) [GET] Parameters: {"actio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: scala-redis requires sbt 0.10.1 (other versions don't work) - is that normal? While trying out the Scala bindings for Redis, I followed the instructions in the README file (clone the repo, cd into it, type sbt) and I got this: $ sbt Getting org.scala-tools.sbt sbt_2.9.1 0.10.1 ... :: problems summary :: :::: WARNIN...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: interprocedural analysis Does gcc (C, C++ and Fortran compilers in particular) support interprocedural analysis to improve performance? If yes, which are the relevant flags? http://gcc.gnu.org/wiki/InterProcedural says the gcc is going to implement IPA, but that page is quite outdated. A: Yes, it supports. Take a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Form validation: un-hide submit button when a radio value is selected and text message is entered I just want my "submit" button to un-hide (so user can push it) when a radio button is selected and a message is entered in the text box. I'm using ruby on rails, but I think this may be a javascript/css question. pleas...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Stacking up methods in Javascript I have an object I created with this snip-it that looks like this: ... var steps = new Array(); this.createStep = function(){steps.push(new step()); return steps[steps.length-1];}; this.getSteps = function(){return steps;}; //returns Array this.removeStep = function(pos)...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: jquery ajaxSubmit replaceTarget javascript I have a div in this pattern: <div id="register_container"> ... <script type="text/javascript"> $(document).ready(function() alert('hi'); $("#customer").css("backgroundColor", "red"); $('#add_item_form').ajaxSubmit({target: "#register_container", replaceT...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549025", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: PHP Curl doesn't work when tried to get contents of a specific domain PHP Curl doesn't work when tried to get contents of a specific domain. The specific domain is 'www.net4winners.com.br', it works with every domain but not with this domain, it always returns: 'object not found' in curl output. PHP Code of this tes...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Problem with model binder property type int In my View Model I have a property: [Required] [MaxLength(4)] [DisplayName("CVC")] public int BillingCvc { get; set; } In my view I use it like so: @Html.TextBoxFor(x => x.BillingCvc, new { size = "4", maxlength = "4" }) When I post the form I get this er...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Trying to get jenkins and gitolite to work successfully - Permission denied (publickey,password) I have been trying for days to get my gitolite work with jenkins so I can have repos hosted from server and working with Jenkins (they are on the same sever). I have gitolite working but I guess I have problems with ssh....
{ "language": "en", "url": "https://stackoverflow.com/questions/7549030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: MySQL function declaration. Not works from PHP. Run's ok from phpmyadmin. Not creates function I have function to cal miles distance: DELIMITER // DROP FUNCTION IF EXISTS distance_miles// ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: loading a JavaScript file with vars not set at load time the post title may not explain fully, but here is what I am hoping to do: I have my JavaScript code in a separate file, and I have it arranged like so var PK = { "vars" : { "uris" : { "app1": "http://this/server/", "app2": "...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Netbeans Auto-Indentation and Curly Braces }{ Is it possible to set up the NetBeans editor to automatically unindent closing curly braces? I want this: if (something){ do thing one; do thing two; } Netbeans gives me this: if (something){ do thing one; do thing two; } and then I have to delete t...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: A Python screen capture script that can be called programmatically? I want to open a page and grab the screen and obtain its mean color with PIL. I want to open about 100 pages so I thought a screen capture script with Python would be useful. I found several of them and I decided to use this simple one: """ A simpl...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can get an image from a 301 redirect download link in PHP? I'm trying to download this image with PHP to edit it with GD. I found many solutions for image links, but this one is a download link. Edit: $curl = curl_init("http://minecraft.net/skin/Notch.png"); $bin = curl_exec($curl); curl_close($curl); $img = @im...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SqlDataAdapter.Fill() - Conversion overflow All, I am encountering "Conversion overflow" exceptions on one of the SqlDataAdapter.Fill() usages for a decimal field. The error occurs for value beginning 10 billion, but not till 1 billion. Here is the code: DataSet ds = new DataSet(); SqlDataAdapter sd = new SqlDataAda...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can we call methods with parameters in Struts2 fieldexpression? I've configured my sturts2 application to use the validation xml for my actions. I also have fieldexpression working. Would it be possible to call a method from my action in the expression. eg: <field name="myField"> <field-validator type="fieldexpre...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549063", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: flash as3 rounding numbers automatically I wrote out a long post trying to explain the exact details of the problem im having, but instead i think ill keep it simple, and ask an example question here: var n1:Number = 9.99999999999999; n1 += 0.000000000000009; var n2:Number = n1 + 10; var n3:Number = n1 - 10; Long s...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Extensible Orchard I am new to Orchard, I am wondering how Can I run my module once project start instead of Orchard Startup module? Also how can I override the Routing to route to my new module?where it is being written? Thanks A: Implement IHomePageProvider. If I understood the question.
{ "language": "en", "url": "https://stackoverflow.com/questions/7549070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Hide one view and unhide another upon touching a button I have been creating "if/then" apps for android and now my boss want me to do the same for his iPad. I just need to figure out how to code so that when the buttons are clicked, it hides the current view (text and button) and reveals the next set of text and bu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: When including external xml file, LayoutInflater throws RuntimeException: "You must supply a layout_width attribute." I'm trying to include a ScrollView (upgrade_content.xml) containing a ListView in my Activity's XML layout file (upgrades.xml). When I include the external file using <include layout="@layout/upgrade...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: e.preventDefault() is not behaving correctly I have a drop down menu that is still triggering an href change even though I'm calling e.preventDefault(). This is how I have my jquery address change configured: $(document).ready(function() { // Setup jQuery address on some elements $('a').address(); // ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549084", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any JSF Select Time Zone component out there? I have been looking for this for a while and haven't found it. It is surprisingly complicated as shown in this old IceFaces tutorial. What is needed is a UIInput component that will set a java.util.TimeZone property, allowing the user to select it from a map o...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549085", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Custom Membership Provider or Profile Provider in mvc asp.net I'm venturing into the world of asp.net mvc. I have not yet understood whether it makes sense to use a custom Membership Provider or use the Profile provider for the user management? A: Membership provider - manages user names, email addresses, and passw...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .Net - using method extensions? Is it possible to use the method extensions to add methods that accept parameters ? for example: myString.NumberOfCharacters("a"); A: yes. like this   public static class StringExtensions { public static void NumberOfCharacters(this string someString, string param) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: One account, multiple ways to login? I want to build an application that allow users to log in via the following: * *my own authentication/authorization solution *3rd party providers, such as "log in with your Gmail account" or "log in with your Facebook account" My concern is that an individual could create a...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549103", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Nil and List as case expressions in Scala This code compiles: def wtf(arg: Any) = { arg match { case Nil => "Nil was passed to arg" case List() => "List() was passed to arg" case _ =>"otherwise" } } But this one does not: def wtf(arg: Any) = { arg match { case List() => "Li...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549111", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: good example applications combining rails 3 and sproutcore I am trying to write a sproutcore frontend for a rails 3.1 application I am making. I have had a look at the sproutcore guides, but I am interested in seeing real examples how to use sproutcore together with rails 3(.1). I have found two examples, but each i...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Exception handling in Python Tornado I am trying to handle exception occurred in AsyncClient.fetch in this way: from tornado.httpclient import AsyncHTTPClient from tornado.httpclient import HTTPRequest from tornado.stack_context import ExceptionStackContext from tornado import ioloop def handle_exc(*args): pri...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549120", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Overlaying an animation on top of UIView What is the best way to overlay an animated gif on top of a UIView? I have an animation of snowfall that I would like to lay on top of a view, yet still retain interaction with the view below. Can this be accomplished with UIView animation, or would CoreAnimation be better (f...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: blackberry os 7 sencha touch tap text field I just got a BlackBerry Torch 9810 running OS 7. I noticed my sencha touch app won't let me tap to enter a text input field. I have to click the trackpad. I know it works normally on non-sencha fields, like the ones here. I tried the example for forms from sencha and I'm h...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Flashbuilder 4.5. Parse results of HTTP Service Call I'm making an HTTP Service Call using Flash Builder 4.5. My web service returns a string. I'm having trouble understanding how to read in the returned string. LoginResult.token = login.Login(Username.text, Password.text); Here is what I have so far. What do I nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Domain is not allowed, og:url/type/title not set... (using comments plugin) We're testing the FB comments plugin on our articles, only I continue to get 'url not reachable' warnings. So I have no idea what I'm doing wrong here - it's telling me og:url, og:type, and og:title aren't set, but not only does it show them...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Customize destination of Redis' RDB file I want to customize the destination of Redis' RDB file to be something other than a file on a mounted file system. For example: * *Send the file to a remote host via scp *Upload the file to Hadoop HDFS (I'm running Redis on a Hadoop cluster, in which we use HDFS for backu...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: When my method is a Helper, Utility or should be turned into a Extension? For example this encryption function could be called a Utility ? public static string HashText(string text) { byte[] encodedBytes; using (var md5 = new MD5CryptoServiceProvider()) { var originalBytes = Encoding.UTF8.GetByte...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CodeIgniter's dbutils not recognizing new database connection Does the Utility Class reconnect to the database defined in your database configuration file when it's initialized? The following code is returning databases from the dev database and not prod: $this->load->database('prod'); $this->load->dbutil(); print_r...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549137", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: LINQ: The specified type member is not supported in LINQ I am trying to run the linq statement below. I am getting the following error message: The specified type member 'CustomerID' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported. I stepped...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How should I pass collections from one view's ViewModel to another View? can anyone please advise a solution in following scenario : I have an MVVM application in which I need to show modal window from Main window to add some value to the Collection that is in viewModel class. What will be the best approach to do th...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Cannot determine the field name in a magento filter query I'm having trouble with using an OR filter in a Magento query. This is what i used: $collection = Mage::getModel('sales/order')->getCollection() ->addAttributeToSelect('*') ->addAttributeToFilter( array( ...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549148", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: use of inner.html Apologies for the strange format of this question. I've asked a couple of similar questions recently and am still at a loss. I REALLY don't know how most of this works, and I've been trying to follow various tutorials etc. on places like W3Schools.com, and with the help of people here, and although...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549149", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is a more economical way of tiling a texture? I am developing a tile based 2d game. I have split things up into components such as skybackground, landbackground, town, UI and so on, with each component handling its drawing. before invoking any of the draw calls, I spritebatch.Begin() with default values so that...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549150", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: south (django app) doesn't alter table even though migration is saved in db Ok so basically when I deploy using Fabric, the south migrate command is being run on the remote machine and fabric outputs that each migration (i.e. 10 of them) were completed. However checking (via explain) the table that the 10th migratio...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I handle binding to an entity that doesn't exist? I'm trying to understand how binding works between the view model and page controls when on a 'New Item' page. For example: TransactionView.xaml.cs public TransactionsView() { InitializeComponent(); this.DataContext = App.ViewModel; } If I have a list...
{ "language": "en", "url": "https://stackoverflow.com/questions/7549161", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }