Search Results

Search found 3171 results on 127 pages for 'manual manuel'.

Page 81/127 | < Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >

  • How can I use git to stage only one line in a file for commit, all from a script?

    - by Sandy
    I'm writing a simple pre-commit git hook that updates the year in copyright headers for files that are staged for commit. After modifying the line with the copyright, I would like the hook to stage that line so that it is part of the commit. It can't just git add the whole file, because there may be other pre-existing changes in there that shouldn't be staged. I don't see any options in the git add manual the let you stage specific lines. I figure I could git stash save --keep-index, apply my change, git add the file, and then git stash pop, but that seems rather crude. Any better approaches?

    Read the article

  • OSGI bundle (or service)- how to register for a given time period?

    - by Alec
    Hello, all! Search did not give me a hint, how can i behave with the following situation: I'd love to have 2 OSGI implementations of the same interface: one is regular, the other should work (be active/present/whatever) on the given time period (f.e for Christmas weeks :)) The main goal is to call the same interface without specifying any flags/properties/without manual switching of ranking. Application should somehow switch implementation for this special period, doing another/regular job before and after :) I'm a newbie, maybe i do not completely understand OSGI concept somewhere, sorry for that of give me a hint or link, sorry for my English. Using Felix/Equinox with Apache Aries.

    Read the article

  • MYSQL -Incorrect Syntax

    - by user1854392
    WHILE x > 1 DO SET x = x - 1; SET totalTime = SELECT CONCAT(FLOOR(HOUR(TIMEDIFF(end_time,start_time)) / 24), ' days ', MOD(HOUR(TIMEDIFF(end_time,start_time)), 24), ' hrs ', MINUTE(TIMEDIFF(end_time,start_time)), ' minutes ') AS total_Time I don't see why I am having a syntax error? It is part of a bigger procedure but is pointing to this aas being incorrect Error message: SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT CONCAT(FLOOR(HOUR(TIMEDIFF(end_time,start_time)) / 24,' days',' at line 11 and totalTime is declared as a VARCHAR(50)

    Read the article

  • What are my alternatives to manage Python packages for clients?

    - by c00kiemonster
    So the setup is a slew of proprietary server/client Python applications running on one Linux box (the server) and a set of Windows 7 workstations (the clients). Everything is running smoothly until any of the proprietary Python packages needs updating. For now I am using distutils eggs which are very easily updated with easy_install, but it is still a manual process which quickly becomes tedious as the number of applications and client workstations grow. The ideal setup IMHO is to have the Python packages on the server so when a client application is launched on a workstation the client application can check to see whether its current Python packages are up-to-date. If not, the client application should download the newer Python package from the server, install it, and then launch as per normal. Does this sounds familiar to anyone? I have tried to find alternatives myself, but as far as I can see there is no Python module offering this functionality. Does anyone have any home made solutions for this?

    Read the article

  • What would be my best MySQL Synchronization method?

    - by Kerry
    We're moving a social media service to be on separate data centers with global load balancing, as our other hosting provider's entire data center went down. Twice. This means that both websites need to be synchronized in some sense -- I'm less worried about the code of the pages, that's easy enough to sync, but they need to have the same database data. From my research on SO, it seems MySQL Replication is a good option, but the MySQL manual, for scaling out, says that its best when there are far more reads then there are writes/updates: http://dev.mysql.com/doc/refman/5.0/en/replication-solutions-scaleout.html In our case, it's about equal. We're getting around 200-300 thousand requests a day right now, and we can grow rapidly. Every request is both a read and write request. What would be the best method or tool to handle this?

    Read the article

  • how can I reliably check that requests to my service file have come from my website?

    - by woot586
    I have a service.php class that I use to service AJAX calls from my website. To prevent other people accessing the service using PHP CURL I would normally check the request has come from mysite, and if they are not then just redirect to my home page e.g. if($_SERVER['HTTP_REFERER'] != "http://www.mysite.com"){ header('location: http://www.mysite.com'); exit; } I read in the PHP holy bible: http://www.php.net/manual/en/reserved.variables.server.php that "Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted." So if this method is not reliable, my question is how can I reliably check that requests to my service file have come from my website? Thanks for any help you can provide!

    Read the article

  • How to display the found matches of preg_match function in PHP?

    - by Eric
    I am using the following to check if links exist on file.php: $fopen = fopen('file.php', 'r'); $fread = fread($fopen, filesize('file.php')); $pattern = "/^<a href=/i"; if (preg_match($pattern, $fread)) { echo 'Match Found'; } else { echo 'Match Not Found'; } if I echo preg_match($pattern, $fread) I get a boolean value, not the found matches. I tried what was on the php.net manual and did this: preg_match($pattern, $fread, $matches); then when I echoed $matches I got "Array" message. So I tried a foreach loop and when that didn't display anything I tried $matches[0] and that too outputted nothing. So how does one go about displaying the matches found?

    Read the article

  • declare and assign value my sql stored procedure(5.0.45)

    - by naveen84n
    Hi everybody , DELIMITER $$ DROP PROCEDURE IF EXISTS quotations.sp_addservices $$ CREATE PROCEDURE quotations.sp_addservices (In categoryname varchar(25),in servicename varchar(250),in hours float,in cost float,in basis nvarchar (100)) BEGIN insert into categorydetails (Category_Name) values (categoryname); if(categoryname!=null) then DECLARE category_id int; set category_id= select max(Category_Id) from categorydetails ; insert into servicesdetails (Service_Name,Category_Id,Hours,Cost,Basis) values(servicename,category_id,hours,cost,basis); end if; END $$ DELIMITER ; This is my stored procedure .I have to retrive the value of categoryid that is posted into the database which is auto increased.Here i cant declare the variable and assign value to variable.Am getting error like Script line: 4 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE category_id int; set category_id= select max(Category_Id) from categor' at line 9 Can any one help me Thanks in advance.

    Read the article

  • Commands implicitly threaded in Makefiles ?

    - by apple92
    Hi, I have a "super" makefile which launches two "sub" make file: libwebcam: @echo -e "\nInvoking libwebcam make." $(MAKE) -C $(TOPDIR)/libwebcam uvcdynctrl: @echo -e "\nInvoking uvcdynctrl make." $(MAKE) -C $(TOPDIR)/uvcdynctrl uvcdynctrl uses libwebcam... I noticed that those two builds are launched as separate threads by make ! Thus sometimes the lib is not available when uvcdynctrl starts being built, and I get errors. By default, make should not launch commands as threads since this is available only through -j (number of jobs) and, according to the make manual, there is no thread by default. I run this on an Ubuntu. Did someone face the same issue ? Apple92

    Read the article

  • Breaking up large DataGridView for printing

    - by Hal
    Hey, I've got a single-row, 40 column-long DataGridView that i need to print. Since i can neither print it directly (because A4 sheets won't cut it ;)) nor adjust its width to the width of the page itself (because the headers look terrible), i wanted to break the DataGridView to 4 separate pieces and display 10 columns per row (imagine: column 1 to 10 in the first line, column 11 to 21 four or five lines below, etc...). Is there an easy way to do this? I was leaning towards a more manual approach (using fors), but i'd love to know if there's a more elegant way. Cheers

    Read the article

  • How would one call std::forward on all arguments in a variadic function?

    - by Noah Roberts
    I was just writing a generic object factory and using the boost preprocessor meta-library to make a variadic template (using 2010 and it doesn't support them). My function uses rval references and std::forward to do perfect forwarding and it got me thinking...when C++0X comes out and I had a standard compiler I would do this with real variadic templates. How though, would I call std::forward on the arguments? template < typename ... Params void f(Params ... params) // how do I say these are rvalue reference? { y(std::forward(...params)); //? - I doubt this would work. } Only way I can think of would require manual unpacking of ...params and I'm not quite there yet either. Is there a quicker syntax that would work?

    Read the article

  • How do I find the speed of an in-progress file upload in cURL?

    - by cinek1lol
    I'd like to know how to check out the speed of a file being uploaded in real time using the cURL library in C++. This is what I have written: void progress_func(void* ptr, double TotalToDownload, double NowDownloaded, double TotalToUpload,double NowUploaded) { cout<<NowUploaded<<endl; } //... int main() { //... curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_func); } But the manual says that it shows average speed, but even this doesn't seem to work with me, because too mach fast is end. How to good write or A well-calculated?

    Read the article

  • Why is Zend Framework (Zend_Db_table) rejecting this SQL Query?

    - by Michael T. Smith
    I'm working on a simple JOIN of two tables (urls and companies). I am using this query call: print $this->_db->select()->from(array('u' => 'urls'), array('id', 'url', 'company_id')) ->join(array('c' => 'companies'), 'u.company_id = c.id'); which is out putting this query: SELECT `u`.`id`, `u`.`url`, `u`.`company_id`, `c`.* FROM `urls` AS `u` INNER JOIN `companies` AS `c` ON u.company_id = c.id Now, I'd prefer the c.* to not actually appear, but either way it doesn't matter. ZF dies with this error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" but I can run that query perfectly fine in my MySQL CLI. Any ideas how to fix up this query?

    Read the article

  • Getting mysql syntax error and cant find source

    - by eGGzy
    I have function that updates log table. function wslog($userID, $log, $where) { safe_query("INSERT INTO ".PREFIX."log ( time, userID, log, where ) values( '".time()."', '".$userID."', '".$log."', '".$where."' ) "); } And I have this php code: wslog($userID, 'server|'.mysql_insert_id().'', 'servers'); But I keep getting syntax error: Query failed: errorno=1064 error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where ) values( '1269208030', '1', 'server|14', 'servers' )' at line 1 query=INSERT INTO ws_DII_log ( time, userID, log, where ) values( '1269208030', '1', 'server|14', 'servers' )

    Read the article

  • Prevent .htaccess syntax error

    - by seengee
    Hi, As part of one our system's we enable a user in the backoffice to add a block of 301 redirects should they need to. This is just a textarea which then populates a specific area of a .htaccess file. As much as this may seem insecure it has only previously used internally by people who know what they are doing but for various reasons they cannot access the specific file. We need now to allow more access to this function, not for the general public, but for people that probably have far less knowledge of regexp etc and syntax in htaccess files. Obviously the major concern here is the user enters some bad syntax and makes their entire site, including the backoffice where they could fix the issue, totally inaccessible without manual intervention. What approaches can i take to make sure that they do not break their site? A htaccess syntax check? copy the file elsewhere and check it doesnt generate a 500 error (with cURL or similar)?. Would welcome any ideas. Thanks.

    Read the article

  • UnicodeDecodeError from a GET-parameter in webapp2

    - by Aneon
    I'm getting a UnicodeDecodeError when recieving a GET-parameter from webapp2 that contains unicode characters, and then using it to do a NDB query. I get the same error message when manually running a unicode() on the parameter in the handler, so there either seems to be a problem in webapp2's URL routing or I've missed something. Preferably, all GET-parameters should be converted to unicode before getting passed into the handler so I don't need to do manual conversions in all of my handlers. I actually think it's worked before in an earlier version. The full error message read: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) The GET-parameter contains the following string: göteborg. It looks fine when I raise an Exception on it, but gives me an error when I (or NDB) use unicode() on it. EDIT: In NDB, it fails on the following code: File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\datastore_types.py", line 1562, in PackString pbvalue.set_stringvalue(unicode(value).encode('utf-8')) Thanks.

    Read the article

  • Joining two select queries and ordering results

    - by user1
    Basically I'm just unsure as to why this query is failing to execute: (SELECT replies.reply_post, replies.reply_content, replies.reply_date AS d, members.username FROM (replies) AS a INNER JOIN members ON replies.reply_by = members.id) UNION (SELECT posts.post_id, posts.post_title, posts.post_date AS d, members.username FROM (posts) as b WHERE posts.post_set = 0 INNER JOIN members ON posts.post_by = members.id) ORDER BY d DESC LIMIT 5 I'm getting this error: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'a INNER JOIN members ON replies.re' at line 2 All I'm trying to do is select the 5 most recent rows (dates) from these two tables. I've tried Join, union etc and I've seen numerous queries where people have put another query after the FROM statement and that just makes no logical sense to me as to how that works? Am I safe to say that you can join the same table from two different but joined queries? Or am I taking completely the wrong approach, because frankly I can't seem see how this query is failing despite reading the error message. (The two queries on there own work fine)

    Read the article

  • Configuration of Application (MVC)

    - by Felipe
    Hi all. I have an application in asp.net mvc 2, and in this application, there are some parts that need to obey an configuration, for example. The app has an document management and the number of document (a field of my domain), need to be manual or automatic, and this choise will be consider in configuration. So, is there any pratice to do this? Need I render the number field (with hidden fields) in my View or it's not necessary? ViewData["key"] is recommended to make the form ? Thanks! Cheers

    Read the article

  • Getting all inner classes by reflection

    - by Roman
    I have the following problem. I have this pretty class and now I want to get all the classes that extend that class (inner classes ) and fill 'classList' with it. ( in an automatic way of course ) public abstract class CompoundReference { private static List<Class<? extends CompoundReference>> classList = new ArrayList<Class<? extends CompoundReference>>(); @CompoundKey(gsType = User.class, dbType = UserDetailsMappings.class) public static class CUser extends CompoundReference { } @CompoundKey(gsType = Catalog.class, dbType = CatalogDetailsMappings.class) public static class CCatalog extends CompoundReference { } @CompoundKey(gsType = Product.class, dbType = ProductDetailsMappings.class) public static class CProduct extends CompoundReference { } @CompoundKey(gsType = Category.class) public static class CCategory extends CompoundReference { } @CompoundKey(gsType = Poll.class, dbType = PollDetailsMappings.class) public static class CPoll extends CompoundReference { } // much mroe inner classes Some manual solution would be just to main such a static block , that is something that I dont want to do. static { classList.addAll(Arrays.asList(CUser.class, CCatalog.class, CProduct.class, CCategory.class, CPoll.class, CComment.class, CWebPage.class, CReview.class, CPost.class, CMessage.class, CStory.class,CPicture.class)); }

    Read the article

  • Can I use the emacs keyboard macro counter as a command prefix?

    - by Sean M
    I'm working on a project in emacs where I'd like to use a keyboard macro that changes slightly with each iteration. When I saw the keyboard macro counter in the manual, that looked like exactly what I needed - but as far as I can tell, that inserts an incrementing number into the current buffer. I want to use an incrementing number as a prefix to another command. For example, instead of inserting 3 into the buffer on the third execution of the macro, I'd like to be able to execute C-u 3 M-x my-command, followed by C-u 4 M-x my-command on the next iteration. Is there way to create a keyboard macro that does this? My specific task is "zipping" two blocks of text in the same buffer together, but even if there's an alternative way to do that specific thing, it'd be good to know the answer to the general question.

    Read the article

  • Programatically convert complex Excel file into HTML format

    - by shuby_rocks
    Hello all, I have a set of complex Excel files (with figures in it) that I want to show in a web browser. So I need to convert them into HTML page first. Since the excel files are very complex, I can not just parse them and generate a HTML table with HTML tags. The current manual solution that works fine is when I use Microsoft Excel software to save the spreadsheet as a HTML page. I want to automate this task in some way since I want to do it progrmatically through Java. Is their any existing solution or a way to do it? Thanks.

    Read the article

  • Sharepoint 2010 - Managed KeyWords

    - by Audioillity
    Hi, Is it possible to import managed keywords into SharePoint 2010? Where are the keywords stored within which database? Background - I'm currently working on a migration from a legacy system into SharePoint 2010. So far everything is going well, and I can even bring across the managed meta data across along with most other data. The process I use was built for SharePoint 2007 to update Lists over SOAP. With a few manual tweaks I've managed to get the metadata to come across. To bring across either managed metadata or managed keywords I need to know the ID for the existing label/keyword. I have this for the Managed Metadata however not for the Managed Keyword. Currently I create a CSV file to be imported for managed metadata before working out the reverent GUID for the source label. Many Thanks Luke

    Read the article

  • Problem with sending "SetCookie" first in php code

    - by Camran
    According to this manual: http://us2.php.net/setcookie I have to set the cookie before anything else. Here is my cookie code: if (isset($_COOKIE['watched_ads'])){ $expir = time()+1728000; //20 days $ad_arr = unserialize($_COOKIE['watched_ads']); $arr_elem = count($ad_arr); if (in_array($ad_id, $ad_arr) == FALSE){ if ($arr_elem>10){ array_shift($ad_arr); } $ad_arr[]=$ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } } else { $expir = time()+1728000; //20 days $ad_arr[] = $ad_id; setcookie('watched_ads', serialize($ad_arr), $expir, '/'); } As you can see I am using variables in setting the cookie. The variables comes from a mysql_query and I have to do the query first. But then, if I do, I will get an error message: Cannot modify header information - headers already sent by ... The error points to the line where I set the cookie above. What should I do?a

    Read the article

  • I can't delete record in Codeigniter

    - by jomblo
    I'm learning CRUD in codeigniter. I have table name "posting" and the coloumns are like this (id, title, post). I successed to create a new post (both insert into database and display in the view). But I have problem when I delete my post in the front-end. Here is my code: Model Class Post_Model extends CI_Model{ function index(){ //Here is my homepage code } function delete_post($id) { $this->db->where('id', $id); $this->db->delete('posting'); } } Controller Class Post extends CI_Controller{ function delete() { $this->load->model('Post_Model'); $this->Post_Model->delete_post("id"); redirect('Post/index/', 'refresh'); } } After click "delete" in the homepage, there was nothing happens. While I'm looking into my database, my records still available. Note: (1) to delete record, I'm following the codeigniter manual / user guide, (2) I found a message error (Undefined variable: id) after hiting the "delete" button in the front-end Any help or suggestion, please

    Read the article

  • MySQL: How to separate a name field in one table into firstname / lastname in two separate tables?

    - by Eileen
    I have a drupal database where the node table is full of profiles. The field node.title is "Firstname Lastname". I want to separate the names so that node.title = "Firstname", and over in another table entirely, content_type_profile.field_lastname_value = "Lastname". The entries in the two tables can be joined on the field nid. I'd love to run a SQL command to do this, and I am fine with taking the naive approach that the first word is the first name, and everything else in the field is last name -- it will mean a few manual corrections down the line, but that's much better than doing it all by hand in the first place. (I read this question and surely the answer lies in there but I am not that SQL-savvy and am not sure how to make it work for my database.) Thanks!

    Read the article

< Previous Page | 77 78 79 80 81 82 83 84 85 86 87 88  | Next Page >