Search Results

Search found 1999 results on 80 pages for 'temporary'.

Page 53/80 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • MySql returning multiple rows from stored procedure / function

    - by pistacchio
    Hi, I need to make a stored procedure or function that returns a set of rows. I've noted that in a stored procedure i can SELECT * FROM table with success. If i fetch rows in a loop and SELECT something, something_other FROM table once per loop execution, I only get one single result. What I need to do is looping, doing some calculations and returning a rowset. What's the best way to do this? A temporary table? Stored functions? Any help appreciated.

    Read the article

  • URL Rewriting from a subdomain to main domain!

    - by JCHASE11
    Hello. I am developing a pretty large website for a client, and its about 90% complete. It is currently hosted on a subdomain like so: now: v2.websitehere.com when complete: www.websitehere.com My problem is that SO much of this site is linked to the temporary subdomain. The newsletter service, multiple google apis, etc. I also have multiple blogs installed that would be hard to move over. Literally, I have over 20 blogs hosted on the subdomain. I also have other PHP scripts that utilize SQL databases. So, what I am getting at is that a migration would be very difficult: time consuming, frustrating, and not something I want to do. I am looking for a a good solution...similar to Wordpress's URL rewriting. Is there something I can do with .htaccess file? Any ideas would be MUCH appreciated.

    Read the article

  • ZendFramework Zend_Form_Element_File setDestination vs rename filter

    - by bibstha
    The code says Zend_Form_element_File::setDestination() is depricated and to use the rename filter. However the rename filter is currently codes such that when path is set, only temporary name is given. Original filename is lost. <?php $file = new Zend_Form_Element_File(); $file->setDestination('/var/www/project/public'); ?> vs <?php $file = new Zend_Form_Element_File(); $file->addFilter('Rename', array('target' => '/var/www/project/public')); ?> Any solution to upload files so that it preserves original filename structure but checks for existing file and appends _1.ext or _2.ext?

    Read the article

  • how to use oracle package to get rid of Global Temp table

    - by john
    I have a sample query like below: INSERT INTO my_gtt_1 (fname, lname) (select fname, lname from users) In my effort to getting rid of temporary tables I created a package: create or replace package fname_lname AS Type fname_lname_rec_type is record ( fname varchar(10), lname varchar(10) ); fname_lname_rec fname_lname_rec_type Type fname_lname_tbl_type is table of fname_lname_rec_type; function fname_lname_func ( v_fnam in varchar2, v_lname in varchar2 )return fname_lname_tbl_type pipelined; being new to oracle...creating this package took a long time. but now I can not figure out how to get rid of the my_gtt_1 how can i say... INSERT INTO <newly created package> (select fnma, name from users)

    Read the article

  • asp.net: moving from session variables to cookies

    - by P a u l
    My forms are losing session variables on shared hosting very quickly (webhost4life), and I think I want to replace them with cookies. Does the following look reasonable for tracking an ID from form to form: if(Request.Cookies["currentForm"] == null) return; projectID = new Guid(Request.Cookies["currentForm"]["selectedProjectID"]); Response.Cookies["currentForm"]["selectedProjectID"] = Request.Cookies["currentForm"]["selectedProjectID"]; Note that I am setting the Response cookie in all the forms after I read the Request cookie. Is this necessary? Do the Request cookies copy to the Response automatically? I'm setting no properties on the cookies and create them this way: Response.Cookies["currentForm"]["selectedProjectID"] = someGuid.ToString(); The intention is that these are temporary header cookies, not persisted on the client any longer than the browser session. I ask this since I don't often write websites.

    Read the article

  • C++ operator[] syntax.

    - by Lanissum
    Just a quick syntax question. I'm writing a map class (for school). If I define the following operator overload: template<typename Key, typename Val> class Map {... Val* operator[](Key k); What happens when a user writes: Map<int,int> myMap; map[10] = 3; Doing something like that will only overwrite a temporary copy of the [null] pointer at Key k. Is it even possible to do: map[10] = 3; printf("%i\n", map[10]); with the same operator overload?

    Read the article

  • Browser-Incompatability with image alignment in CSS using YUI grid (Firefox + Opera)

    - by Rotimi
    I'm having trouble with the alignment of two images on the footer of my temporary website (http://www.rotimioyewole.com). I'm new to the YUI grid, which I think may be a factor. It should look roughly like this (works correctly in Chrome and Safari, haven't tested IE yet): (http://cl.ly/44fH) But on FF and Opera look like this: http://cl.ly/44aO If I can have some sort of consistency then the website would at least be presentable. Ideally, I would also like to align both images on the same Y axis, as well as the text next to the icons. I had trouble figuring out how to search for a solution..can anybody help me? Thanks in advance

    Read the article

  • What is the best signature for overloaded arithmetic operators in C++?

    - by JohnMcG
    I had assumed that the canonical form for operator+, assuming the existence of an overloaded operator+= member function, was like this: const T operator+(const T& lhs, const T& rhs) { return T(lhs) +=rhs; } But it was pointed out to me that this would also work: const T operator+ (T lhs, const T& rhs) { return lhs+=rhs; } In essence, this form transfers creation of the temporary from the body of the implementation to the function call. It seems a little awkward to have different types for the two parameters, but is there anything wrong with the second form? Is there a reason to prefer one over the other?

    Read the article

  • What's wrong with this Perl 'grep' syntax?

    - by wes
    I've got a data structure that is a hash that contains an array of hashes. I'd like to reach in there and pull out the first hash that matches a value I'm looking for. I tried this: my $result = shift grep {$_->{name} eq 'foo'} @{$hash_ref->{list}}; But that gives me this error: Type of arg 1 to shift must be array (not grep iterator). I've re-read the perldoc for grep and I think what I'm doing makes sense. grep returns a list, right? Is it in the wrong context? I'll use a temporary variable for now, but I'd like to figure out why this doesn't work.

    Read the article

  • indexing question

    - by user522962
    I have a table w/ 3 columns: name, phone, date. I have 3 indexes: 1 on phone, 1 on date and 1 on phone and date. I have the following statement: SELECT * FROM ( SELECT * FROM people WHERE phone IS NOT NULL ORDER BY date DESC) as t GROUP BY phone Basically, I want to get all unique phone numbers ordered by date. This table has about 2.5 million rows but takes forever to execute....are my indexes right? UPDATE: My EXPLAIN statement comes back with 2 rows: 1 for primary table and 1 for derived table. It says I am using temporary and using filesort for my primary table. For my derived table, it says my possible keys are (phone), and (phone, date) but it is using filesort.

    Read the article

  • Run .exe packaged in .jar

    - by user1471327
    I am trying to merge 2 programs I have made to one .jar file. One program is a .jar written in java and the second one is an .exe written in c++. I put both files to the new .jar, wrote this code but it didn't work. When this code was exported to .jar and executed neither of 2 files ran and I got error "no main manifest attribute, in merged.jar" in cmd. Though it worked perfectly when run in eclipse. public class main { public static void main(String[] args) { try { Runtime.getRuntime().exec("cmd /c project1.jar"); Runtime.getRuntime().exec("cmd /c project2.exe"); } catch(Exception exce) { /*handle exception*/ } } } Any idea how to fix this or is there another way to do it? I am new to java, so can't think of anything good. Maybe it would be possible to drop these files to a temporary location in windows and delete them after they're executed?

    Read the article

  • Detecting when a process has finished (but not exited)

    - by Egwor
    I have a program that's run in unix (that I have no control over) that when finished prints 'Completed successfully' but does not exit. I want to automatically detect when the process finishes (by checking the output of the command), so that I can kill the process and so that I can proceed do other activities. The complexity comes because I want to be able to run multiples of these scripts concurrently. (One activity I need to do requires the script to be called with various inputs, but each time the script runs it takes a while to return, and so I want to do them in parallel) Has anyone done something similar to this? I could redirect the stderr and stdout output of the command to a temporary file which has a random file name, then tail the file and pipe to grep for the end conditions (I.e. the certain log lines). The problem is, surely tail -f would keep running, and so it would never exit. Should I poll? If so, what's the best approach?

    Read the article

  • MySQL: Query to obtain recipes using all given ingredients.

    - by John_A
    hi I have the following simplified tables: CREATE TABLE recipe(id int, name varchar(25)); CREATE TABLE ingredient(name varchar(25)); CREATE TABLE uses_ingredient(recipe_id int, name varchar(25)); I want to make a query that returns all id's of recipes that contain both Chicken and Cream. I have tried SELECT recipe_id FROM uses_ingredient INNER JOIN (SELECT * FROM ingredient WHERE name="Chicken" OR name="Cream") USING (name) GROUP BY recipe_id HAVING COUNT(recipe_id) >= (SELECT COUNT(*) FROM theme); which gives me :"ERROR 1248 (42000): Every derived table must have its own alias" and is probably wrong too. Next I tried SELECT recipe_id FROM (SELECT * FROM ingredient WHERE name="Chicken" OR name="Cream") AS t INNER JOIN uses_ingredient USING (name) GROUP BY recipe_id HAVING COUNT(recipe_id)>= (SELECT COUNT(*) FROM t); which gives "ERROR 1146 (42S02): Table 'recipedb.t' doesn't exist" I want to avoid creating temporary tables including using ENGINE=MEMORY.

    Read the article

  • web-development: how do you usually handle the "under costruction" page"?

    - by Patrick
    hi, I was wondering what's the best way to switch a website to a temporary "under costruction" page and switch it back to the new version. For example, in a website, my customer decided to switch from Joomla to Drupal and I had to create a subfolder for the new CMS, and then move all the content to the root folder. 1) Moving all the content back to the root folder always create some problems with file permissions, links, etc... 2) Creating a rewrite rule in .htaccess or forward with php is not a solution because another url is shown including the top folder. 3) Many host services do not allow to change the root directory, so this is not an option since I don't have access to apache config file. Thanks

    Read the article

  • Uploading files wont work on production server

    - by Camran
    I have a php script which uploads images to a temporary folder on the server. This works on my local computer with the local (virtual) server. (wampserver). However, on the production server (linux) I cant get it working. Everything is loading as it should, except for that the file doesn't show up on the server. My Q is, is there anything I should think about when moving to a production server with uploading images or files? I have set permissions on the folder where the images are supposed to go to 777 and also the php-code which uploads them to 777. Thanks

    Read the article

  • Easy way to cast an object array into another type in C#

    - by Na7coldwater
    I want to be able to be able to quickly cast an array of objects to a different type, such as String, but the following code doesn't work: String[] a = new String[2]; a[0] = "Hello"; a[1] = "World"; ArrayList b = new ArrayList(a); String[] c = (String[]) b.ToArray(); And I don't want to have to do this: String[] a = new String[2]; a[0] = "Hello"; a[1] = "World"; ArrayList b = new ArrayList(a); Object[] temp = b.ToArray(); Object[] temp = b.ToArray(); String[] c = new String[temp.Length]; for(int i=0;i<temp.Length;i++) { c[i] = (String) temp[i]; } Is there an easy way to do this without using a temporary variable?

    Read the article

  • Model association changes in production environment, specifically converting a model to polymorphic?

    - by dustmoo
    Hi everyone, I was hoping I could get feedback on major changes to how a model works in an app that is in production already. In my case I have a model Record, that has_many PhoneNumbers. Currently it is a typical has_many belongs_to association with a record having many PhoneNumbers. Of course, I now have a feature of adding temporary, user generated records and these records will have PhoneNumbers too. I 'could' just add the user_record_id to the PhoneNumber model, but wouldn't it be better for this to be a polymorphic association? And if so, if you change how a model associates, how in the heck would I update the production database without breaking everything? .< Anyway, just looking for best practices in a situation like this. Thanks!

    Read the article

  • How to make dll referenced by ActiveX component accessible?

    - by sherpa
    I have an ActiveX component developed in C#. I'm referencing a dll which comes with other native dlls and it is loading them on the fly expecting them to be in the same folder (probably using Assembly.GetExecutingAssembly().Location but not sure, I don't have control over them). There is also one ini file which is also expected to be in the same folder. When I run the application as Windows form app, everything is fine, of course. But the trouble comes when I run it within Internet Explorer as the base directory is at the location of iexplore.exe. Obviously neither the dlls or the ini file can be found and many temporary working files outputted by the dlls are located in Internet Explorer folder. The workaround is to copy all ddls and ini file into the ie folder but that is not something I'd be happy about. What is the proper solution to this? Can I somehow set the base path for the ActiveX component?

    Read the article

  • SQL most popular

    - by Brae
    I have a mysql table with items in relation to their order. CREATE DATABASE IF NOT EXISTS `sqltest`; USE `sqltest`; DROP TABLE IF EXISTS `testdata`; CREATE TABLE `testdata` ( `orderID` varchar(10) DEFAULT NULL, `itemID` varchar(10) DEFAULT NULL, `qtyOrdered` int(10) DEFAULT NULL, `sellingPrice` decimal(10,2) DEFAULT NULL ) INSERT INTO `testdata`(`orderID`,`itemID`,`qtyOrdered`,`sellingPrice`) values ('1','a',1,'7.00'),('1','b',2,'8.00'),('1','c',3,'3.00'),('2','a',1,'7.00'),('2','c',4,'3.00'); Intended Result: A = (1+1)2 B = 2 C = (2+4)6 <- most popular How do I add up all the qty's for each item and result the highest one? It should be fairly strait forward but I'm new to SQL and I can't work this one out :S Solution needs to be mysql and or php. I guess there needs to be some sort of temporary tally variable for each item ID, but that seems like it could get messy with too many items.

    Read the article

  • jQuery Fade a div off the screen

    - by Scott B
    In my app, I have a temporary div that is shown each time the app is saved (see markup below). I'm using jQuery 1.4.2 and would like to know the command that will fade this div off the screen after 3 seconds... <script src="../wp-content/themes/mytheme/jquery-1.4.2.min.js" type="text/javascript"></script> if ($_REQUEST['saved']) echo '<div id="message" class="updated fade"><p>'.$themename.' settings saved.</strong></p></div>';

    Read the article

  • CouchDB: How to change view function via javascript?

    - by osti
    Hello Guys, I am playing around with CouchDB to test if it is "possible" [1] to store scientific data (simulated and experimental raw data + metadata). A big pro is the schema-less approach of CouchDB: we have to be very flexible with the metadata, as the set of parameters changes very often. Up to now I have some code to feed raw data, plots (both as attachments), and hierarchical metadata (as JSON) into CouchDB documents, and have written some prototype Javascript for filtering and showing. But the filtering is done on the client side (a.k.a. browser): The map function simply returns everything. How could I change the (or push a second) map function of a specific _design-document with simple browser-JS? I do not think that a temporary view would yield any performance gain... Thanks for your time and answers. [1]: of course it is possible, but is it also useful? feasible? reasonable?

    Read the article

  • 1030 Got error 28 from storage engine

    - by ScoRpion...
    I am working on a project where i need to create a database with 300 tables for each user who wants to see the demo application. it was working fine but today when i was testing with a new user to see a demo it showed me this error message 1030 Got error 28 from storage engine After spending some time googling i found it is an error that is related to space of database or temporary files. I tried to fix it but i failed. now i am not even able to start mysql. How can i fix this and i would also like to increase the size to maximum so that i won't face the same issue again and again.

    Read the article

  • C++ Reference of vector

    - by void
    Hello, class Refvect { public: vector<int> &refv; Refvect(int t, vector<int> &refv = vector<int>()) : refv(refv) { }; void operator()() { refv.clear(); } }; int main () { Refvect r(0); r(); } With Visual Studio 2010, this gives me an error : "vector iterators incompatible" at the execution, but I don't understand why (but I can insert elements in refv without any problem). The temporary object vector() lives as long as the reference, no?

    Read the article

  • Where should I declare a list of 5,000+ words?

    - by user647362
    I am writing a game in python in which I must periodically pull a random word from a list of words. When I prototyped my game I declared a word_list = ['cat','dog','rat','house'] of ten words at the top of one of my modules. I then use choice(word_list) to get a random word. However, I must must change this temporary hack into something more elegant because I need to increase the size of the word list to 5,000+ words. If I do this in my current module it will look ridiculous. Should I put all of these words in a flat txt file, and then read from that file as I need words? If so, how would I best do that? Put each word an a separate line and then read one random line? I'm not sure what the most efficient way is.

    Read the article

  • Advanced Registry Monitoring

    - by RyanTimmons91
    I'm attempting to create a small utility to watch for the creation (or modification) of a specific registry key, and to kill the process responsible for causing that registry modification. I have had success in watching the changes to the registry via a class called 'RegistryMonitor', however it does not give you any information on what process initiated the registry call, through some googling I found that a library called 'EasyHook' should be able to do what I want, but all the documentation states that its designed for a per-application hook. The program itself is a temporary security patch, until our vendors come out with an official security update. As best I can tell there isn't a way to do exactly what I want to accomplish from C#, which is the only language I can comfortable write, test and execute software in. Any help on this would be appreciated I'm considering watching the registry changes via the program I already have, then if the change is discovered (the pc is already infected) running RKill and locking down the PC to prevent the issue from getting any worse

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >