Search Results

Search found 3033 results on 122 pages for 'manual'.

Page 103/122 | < Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >

  • HELP A NEWB (AGAIN) PLZ

    - by Ken
    Okay, I must be an idiot, because this is my 3rd question for today. Here's my code: date_default_timezone_set("America/Los_Angeles"); include("mainmenu.php"); $con = mysql_connect("localhost", "root", "********"); if(!$con){ die(mysql_error()); } $usrname = $_POST['usrname']; $fname = $_POST['fname']; $lname = $_POST['lname']; $password = $_POST['password']; $email = $_POST['email']; mysql_select_db("`users`, $con) or die(mysql_error()"); $query = ("INSERT INTO `users`.`data` (`id`, `usrname`, `fname`, `lname`, `email`, `password`) VALUES (NULL, '$usrname', '$fname', '$lname', '$email', 'password'))"); mysql_query('$query') or die(mysql_error()); mysql_close($con); echo("Thank you for registering!"); I always get the error returned as: "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 '$query' at line 1. Help a newbie. I'm about to stab my monitor.

    Read the article

  • Maven build issue with Hibernate for Windows

    - by wishi_
    Hi! I'm getting build errors for for my Maven enabled project related to the Hibernate extension. - It's a very basic app, and I was able to solve this issue on my Linux box by manually installing some required artifacts: mvn install:install-file -DgroupId=javassist -DartifactId=javassist -Dversion=3.9.0 -Dpackaging=jar -Dfile=foo.jar That worked out (Hibernate as a set of required deps). But in case of Windows things are different. How do I add the dependencies manually to Maven on Windows? 1) org.hibernate:hibernate:jar:3.3.2 Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate -Dversion=3.3.2 -Dpackaging=jar -Dfile=/path/to/file 2) javassist:javassist:jar:3.9.0 Can I automate this cumbersome manual dependency installation for my coworkers on their Windows machines? Are there any helpful tools or GUI that can perform these tasks? The best way would be that Maven does it all automatically. I'm not too familiar with it jet. Thanks for answers.

    Read the article

  • Sync data between a windows desktop app and windows mobile client app

    - by Chris W
    I need to knock up a very quick prototype/proof of concept application to demo to someone within the next couple of days so I've minimal time to research this as fully as I normally would. The set-up is a very simple database application running on a laptop - will only ever be a single user updating a couple of tables so I was thinking of knocking up a basic Win Forms app against SQL Compact. Visual Studio's auto generated data grid edit screens will be fine with a little customisation. The second aspect is to then add a windows mobile client application that can pull data from both tables stored on the laptop, edit some data and insert some extra rows before sending the changes back to the laptop copy of the database. I've not done any WinMo development so what's the best approach for me to look at. Is it easy enough to sync data between the two databases when the WinMo device is connected to the laptop with USB? Most of the samples I've looked at so far seem to be syncing SQL Compact with SQL Standard using IIS which seems a bit overkill. The volumes of data to be synced are so small that I can easily write some manual sync code if it's easy for me to query/update the Compact DB from the laptop application when the device is connected.

    Read the article

  • FTP exception 501 "pathname" more than 8 characters

    - by BigMac66
    I am trying to access a file via a URI using the FTP protocol. For obvious security reasons I had to make some changes but this is where the problems seem to be coming from. My URI is as follows: ftp://user:[email protected]/u/Bigpathname/XYZ/ABC/BigPathname/bigpathname/xyz/abc/MY_LOG.LOG And I see this exception: sun.net.ftp.FtpProtocolException: CWD Bigpathname:501 A qualifier in "Bigpathname" is more than 8 characters This is really confusing as I can access the file from a Windows 7 command line with the CD command just fine. Both one directory at a time and as a full path. I found one article mentioning that MVS file names must be 8 or fewer characters but this does not explain how I can get to these same files from my command line! They do exist there is data there that I can download manual but I can not get there via a URI in Java. PS I use .toURL().openStream() to get files on my local machine just fine, it only fails when I try to get them from my server. EDIT October 1st I am able to access files on the MVS host using FileZilla and the basic FTP client from the Windows 7 command line - but I still cannot get them from a URI/URL. I downloaded a very basic Java built FTP client and tried accessing the same file in my program from there and the path works but because my file name has a dot in it "MY_LOG.LOG" I am getting File does not exist 501 Invalid data set name "MY_LOG.LOG". Use MVS Dsname conventions. I am utterly perplexed by this...

    Read the article

  • Help converting subquery to query with joins

    - by Tim
    I'm stuck on a query with a join. The client's site is running mysql4, so a subquery isn't an option. My attempts to rewrite using a join aren't going too well. I need to select all of the contractors listed in the contractors table who are not in the contractors2label table with a given label ID & county ID. Yet, they might be listed in contractors2label with other label and county IDs. Table: contractors cID (primary, autonumber) company (varchar) ...etc... Table: contractors2label cID labelID countyID psID This query with a subquery works: SELECT company, contractors.cID FROM contractors WHERE contractors.complete = 1 AND contractors.archived = 0 AND contractors.cID NOT IN ( SELECT contractors2label.cID FROM contractors2label WHERE labelID <> 1 AND countyID <> 1 ) I thought this query with a join would be the equivalent, but it returns no results. A manual scan of the data shows I should get 34 rows, which is what the subquery above returns. SELECT company, contractors.cID FROM contractors LEFT OUTER JOIN contractors2label ON contractors.cID = contractors2label.cID WHERE contractors.complete = 1 AND contractors.archived = 0 AND contractors2label.labelID <> 1 AND contractors2label.countyID <> 1 AND contractors2label.cID IS NULL

    Read the article

  • cakephp group based permissions

    - by Elwhis
    Hey guys, I would like to have group based restrictions that would allow users to access only specified parts of the web. I am new to the whole ACL stuff and I didn't quite get it from the manual :/ therefore I would like to ask some questions. But before any questions, my routes look like this: Router::connect('/', array('controller' => 'users', 'action' => 'login')); Router::connect('/admin/:controller/:action/*', array('prefix' => 'admin', 'admin' => true)); Router::connect('/registered/:controller/:action/*', array('prefix' => 'registered', 'registered' => true)); 1.) How do I restrict users from any other group than Administrator to access ONLY the /registered/ part of the web 2.) How do I prevent anyone from using the default addresses like www.example.com/users/add on a global scale (I want only www.example.com/admin/users/add or www.example.com/registered/users/add type of addresses)? This kind of addresses is not event set in the routes.php but they still work. Any answers apprecated

    Read the article

  • Are there any free Xml Diff/Merge tools available?

    - by Russell
    I have several config files in my .net applications which I would like to merge application settings elements etc. I was about to begin doing it manually as I usually do, however thought there must be an XML diff GUI tool available somewhere. The tool would be able to go to the element level to compare and display the differences etc. However Google gave no substantive free tool results and no hints for anything of value. Is such a tool available? That is very useful? For free? Thanks in advance. :) Edit: Here is a bit of clarification of the functionality that would turn my error-prone, tedious manual job into a 1-minute simpler task (and potential to automate): In KDiff3, you can do a diff/merge of entire directories. There is a hierarchical diff which is very accurate, user-friendly and clear. I was interested in finding a similar solution, however instead of directory hierarchy, an XML element hierarchy. If there is no such open source software, I am considering creating one on CodePlex to provide this functionality.

    Read the article

  • how to format a date with code igniter

    - by Jeff Davidson
    I'm trying to figure out what I'm doing wrong here. I'm wanting to format the date_published field in my query and I'm getting an t_string syntax error in my IDE. $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky,' date_format('site_news_articles.date_published, 'f jS, Y')'); UPDATE: function getNewsTitles($category_id) { $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky'); $this->db->select("DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date", TRUE); $this->db->from('site_news_articles'); $this->db->where('site_news_articles.news_category_id', $category_id); $this->db->where('site_news_articles.is_approved', 'Yes'); $this->db->where('site_news_articles.status_id', 1); $this->db->order_by('site_news_articles.date_published', 'desc'); $this->db->limit(10); $query = $this->db->get(); return $query->result_array(); } Error Number: 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 'FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 A' at line 2 SELECT site_news_articles.article_title, site_news_articles.is_sticky, DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 AND site_news_articles.is_approved = 'Yes' AND site_news_articles.status_id = 1 ORDER BY site_news_articles.date_published desc LIMIT 10 Filename: /home/xtremer/public_html/models/sitemodel.php Line Number: 140

    Read the article

  • PHP | SQL syntax error when inserting array

    - by Philip
    Hi guys, I am having some trouble inserting an array into the sql database. my error is as follows: Unable to add : 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 '06:45:23,i want to leave a comment)' at line 1 My query var_dump is: string(136) "INSERT INTO news_comments (news_id,comment_by,comment_date,comment) VALUES (17263,Philip,2010-05-11 06:45:23,i want to leave a comment)" My question is how can i add an empty value to id as it is the primary key and not news_id my insert function looks like this: function insertQuery($tbl, &$data) { global $mysqli; $_SESSION['errors'] = array(); require_once '../config/mysqli.php'; $query = "INSERT INTO $tbl (".implode(',',array_keys($data)).") VALUES (".implode(',',array_values($data)).")"; var_dump($query); if($result = mysqli_query($mysqli, $query)) { //$id = mysqli_insert_id($mysqli); print 'Very well done sir!'; } else { array_push($_SESSION['errors'], 'Unable to add : ' . mysqli_error($mysqli)); } } Note: arrays are not my strong point so i may be using them in-correctly!

    Read the article

  • Too many columns to index - use mySQL Partitions?

    - by Christopher Padfield
    We have an application with a table with 20+ columns that are all searchable. Building indexes for all these columns would make write queries very slow; and any really useful index would often have to be across multiple columns increasing the number of indexes needed. However, for 95% of these searches, only a small subset of those rows need to be searched upon, and quite a small number - say 50,000 rows. So, we have considered using mySQL Partition tables - having a column that is basically isActive which is what we divide the two partitions by. Most search queries would be run with isActive=1. Most queries would then be run against the small 50,000 row partition and be quick without other indexes. Only issue is the rows where isActive=1 is not fixed; i.e. it's not based on the date of the row or anything fixed like that; we will need to update isActive based on use of the data in that row. As I understand it that is no problem though; the data would just be moved from one partition to another during the UPDATE query. We do have a PK on id for the row though; and I am not sure if this is a problem; the manual seemed to suggest the partition had to be based on any primary keys. This would be a huge problem for us because the primary key ID has no basis on whether the row isActive.

    Read the article

  • HTML Table: How to resize data cells when already specified "colspan"?

    - by Jenny
    I have tabular data to display, which has a meaning to both rows and columns. Columns are time blocks, rows are days. A particular datacell is confined to a single day, but can be in multiple time block. To show this, I am using the colspan tag. <div id = "GuideTable"> <table> <tr> <td colspan = 3> </td></tr></table> </div> Or Whatever. I'm trying to apply CSS formating to the entire table, and for changing colors, etc, things are fine, but wanting to have a consistent width is where I am running into problems. Right now, each data cell's width seems tied to the maximum width in its column (everything auto lines up). Some columns are itty bitty, others are huge. I'm trying to make columns consistently sized (even if that means every column is as big as the biggest column needs to be), but setting an individual datacells width (either via css or in the tag itself) is getting me nowhere. I'm thinking maybe the colspan tag is overriding my manual width? If that's the case, how can I change the width of a column as a whole, especially since they aren't explicitly defined? (CAN you explicitly define columns?) Examples of the CSS I'm using: #GuideTable td{ background:#ffffff; border-style: solid; border-width: 1px; width: 100px; }

    Read the article

  • Parse a CSV file extracting some of the values but not all.

    - by Yallaa
    Good day, I have a local csv file with values that change daily called DailyValues.csv I need to extract the value field of category2 and category4. Then combine, sort and remove duplicates (if any) from the extracted values. Then save it to a new local file NewValues.txt. Here is an example of the DailyValues.csv file: category,date,value category1,2010-05-18,value01 category1,2010-05-18,value02 category1,2010-05-18,value03 category1,2010-05-18,value04 category1,2010-05-18,value05 category1,2010-05-18,value06 category1,2010-05-18,value07 category2,2010-05-18,value08 category2,2010-05-18,value09 category2,2010-05-18,value10 category2,2010-05-18,value11 category2,2010-05-18,value12 category2,2010-05-18,value13 category2,2010-05-18,value14 category2,2010-05-18,value30 category3,2010-05-18,value16 category3,2010-05-18,value17 category3,2010-05-18,value18 category3,2010-05-18,value19 category3,2010-05-18,value20 category3,2010-05-18,value21 category3,2010-05-18,value22 category3,2010-05-18,value23 category3,2010-05-18,value24 category4,2010-05-18,value25 category4,2010-05-18,value26 category4,2010-05-18,value10 category4,2010-05-18,value28 category4,2010-05-18,value11 category4,2010-05-18,value30 category2,2010-05-18,value31 category2,2010-05-18,value32 category2,2010-05-18,value33 category2,2010-05-18,value34 category2,2010-05-18,value35 category2,2010-05-18,value07 I've found some helpful parsing examples at http://www.php.net/manual/en/function.fgetcsv.php and managed to extract all the values of the value column but don't know how to restrict it to only extract the values of category2/4 then sort and clean duplicate. The solution needs to be in php, perl or shell script. Any help would be much appreciated. Thank you in advance.

    Read the article

  • In SQL, why is "select *, count(*) from sentGifts group by whenSent;" ok, but when "*" and "count(*)

    - by Jian Lin
    In SQL, using the table: mysql> select * from sentGifts; +--------+------------+--------+------+---------------------+--------+ | sentID | whenSent | fromID | toID | trytryWhen | giftID | +--------+------------+--------+------+---------------------+--------+ | 1 | 2010-04-24 | 123 | 456 | 2010-04-24 01:52:20 | 100 | | 2 | 2010-04-24 | 123 | 4568 | 2010-04-24 01:56:04 | 100 | | 3 | 2010-04-24 | 123 | NULL | NULL | 1 | | 4 | 2010-04-24 | NULL | 111 | 2010-04-24 03:10:42 | 2 | | 5 | 2010-03-03 | 11 | 22 | 2010-03-03 00:00:00 | 6 | | 6 | 2010-04-24 | 11 | 222 | 2010-04-24 03:54:49 | 6 | | 7 | 2010-04-24 | 1 | 2 | 2010-04-24 03:58:45 | 6 | +--------+------------+--------+------+---------------------+--------+ 7 rows in set (0.00 sec) The following is OK: mysql> select *, count(*) from sentGifts group by whenSent; +--------+------------+--------+------+---------------------+--------+----------+ | sentID | whenSent | fromID | toID | trytryWhen | giftID | count(*) | +--------+------------+--------+------+---------------------+--------+----------+ | 5 | 2010-03-03 | 11 | 22 | 2010-03-03 00:00:00 | 6 | 1 | | 1 | 2010-04-24 | 123 | 456 | 2010-04-24 01:52:20 | 100 | 6 | +--------+------------+--------+------+---------------------+--------+----------+ 2 rows in set (0.00 sec) But suppose we want the count(*) to appear as the first column: mysql> select count(*), * from sentGifts group by whenSent; ERROR 1064 (42000): 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 '* from sentGifts group by whenSent' at line 1 it gave an error. Why is it so and what is a way to fix it? I realized that this is ok: mysql> select count(*), whenSent from sentGifts group by whenSent; +----------+------------+ | count(*) | whenSent | +----------+------------+ | 1 | 2010-03-03 | | 6 | 2010-04-24 | +----------+------------+ 2 rows in set (0.00 sec) but what about the one above that gave an error? thanks.

    Read the article

  • ecommerce - use server side code for hidden values in an html form

    - by bsarmi
    I'm trying to learn how to implement a donation form on a website using virtual merchant. The html code from their developer manual goes like this: <form action="https://www.myvirtualmerchant.com/VirtualMerchant/process.do" method="POST"> Your Total: $5.00 <br/> <input type="hidden" name="ssl_amount" value="5.00"> <br/> <input type="hidden" name="ssl_merchant_id" value="my_virtualmerchant_ID"> <input type="hidden" name="ssl_pin" value="my_PIN"> <input type="hidden" name="ssl_transaction_type" value="ccsale"> <input type="hidden" name="ssl_show_form" value="false"> Credit Card Number: <input type="text" name="ssl_card_number"> <br/> Expiration Date (MMYY): <input type="text" name="ssl_exp_date" size="4"> <br/> <br/> <input type="submit" value="Continue"> </form> I have that in an html file and it works fine, but they suggest that the merchant data (the input type="hidden" values) should be in a Server Side Code. I was looking at cURL but it'a all very new to me and I spent a couple of hours trying to find some guide or some sample code on how to accomplish that. Any suggestions or help is greatly appreciated. Thanks!

    Read the article

  • Extracting exported functions out of a shared lib (ubuntu)

    - by Pingu
    the title already describes my problem. I found this post, but it didn't completely answers my question. With the help of it i got this output from nm... $nm -C -g -D ./libLoggingHandler.so 000000cc A _DYNAMIC ... 000042e0 T write_str(char*, char const*, int*) 00005a78 T RingBuffer::WriteUnlock() ... 00005918 T TraceLines::GetItemSize() ... U SharedMemory::attach(int, void const*, int) ... 00003810 T TraceProfile::FindLineNr(int, int) ... 00002d40 T LoggingHandler::getLogLevel() ... U SharedResource::getSharedResourceKey(char const*, int) ... which are the exported functions? I already found a hint in this post, that the "T" indicates that its getting exported. But if i check the nm manual here, it just says T - The symbol is in the text (code) section. My questions is: Does this output give me the information which functions are exported functions (or variables)? If not, how do i get it? Greetings, Pingu

    Read the article

  • Best approach to cache Counts from SQL tables ?

    - by pixel3cs
    I would like to develop a Forum from scratch, with special needs and customization. I would like to prepare my forum for intensive usage and wondering how to cache things like User posts count and User replies count. Having only three tables, tblForum, tblForumTopics, tblForumReplies, what is the best approach of cache the User topics and replies counts ? Think at a simple scenario: user press a link and open the Replies.aspx?id=x&page=y page, and start reading replies. On the HTTP Request, the server will run an SQL command wich will fetch all replies for that page, also "inner joining with tblForumReplies to find out the number of User replies for each user that replied." select tblForumReplies.*, tblFR.TotalReplies from tblForumReplies inner join ( select IdRepliedBy, count(*) as TotalReplies from tblForumReplies group by IdRepliedBy ) as tblFR on tblFR.IdRepliedBy = tblForumReplies.IdRepliedBy Unfortunately this approach is very cpu intensive, and I would like to see your ideas of how to cache things like table Counts. If counting replies for each user on insert/delete, and store it in a separate field, how to syncronize with manual data changing. Suppose I will manually delete Replies from SQL.

    Read the article

  • How do I call Matlab in a script on Windows?

    - by Benjamin Oakes
    I'm working on a project that uses several languages: SQL for querying a database Perl/Ruby for quick-and-dirty processing of the data from the database and some other bookkeeping Matlab for matrix-oriented computations Various statistics languages (SAS/R/SPSS) for processing the Matlab output Each language fits its niche well and we already have a fair amount of code in each. Right now, there's a lot of manual work to run all these steps that would be much better scripted. I've already done this on Linux, and it works relatively well. On Linux: matlab -nosplash -nodesktop -r "command" or echo "command" | matlab -nosplash -nodesktop ...opens Matlab in a "command line" mode. (That is, no windows are created -- it just reads from STDIN, executes, and outputs to STDOUT/STDERR.) My problem is that on Windows (XP and 7), this same code opens up a window and doesn't read from / write to the command line. It just stares me blankly in the face, totally ignoring STDIN and STDOUT. How can I script running Matlab commands on Windows? I basically want something that will do: ruby database_query.rb perl legacy_code.pl ruby other_stuff.rb matlab processing_step_1.m matlab processing_step_2.m # etc, etc. I've found out that Matlab has an -automation flag on Windows to start an "automation server". That sounds like overkill for my purposes, and I'd like something that works on both platforms. What options do I have for automating Matlab in this workflow?

    Read the article

  • C# and Excel best practices

    - by rlp
    I am doing a lot of MS Excel interop i C# (Visual Studio 2012) using Microsoft.Office.Interop.Excel. It requires a lot of tiresome manual code to include Excel formulas, doing formatting of text and numbers, and making graphs. I would like it very much if any of you have some input on how I do the task better. I have been looking at Visual Studio Tools for Office, but I am uncertain on its functions. I get it is required to make Excel add-ins, but does it help doing Excel automation? I have desperately been trying to find information on working with Excel in Visual Studio 2012 using C#. I did found some good but short tutorials. However I really would like a book an the subject to learn the field more in depth regarding functionality and best practices. Searching Amazon with my limited knowlegde only gives me book on VSTO using older versions of Visual Studio. I would not like to use VBA. My applications use Excel mainly for visualizing compiled from different sources. I also to data processing where Excel is not required. Futhermore, I can write C# but not VB.

    Read the article

  • Rails 3 MySQL 2 reports an error in what looks to be valid SQL syntax

    - by John Judd
    I am trying to use the following bit of code to help in seeding my database. I need to add data continually over development and do not want to have to completely reseed data every time I add something new to the seeds.rb file. So I added the following function to insert the data if it doesn't already exist. def AddSetting(group, name, value, desc) Admin::Setting.create({group: group, name: name, value: value, description: desc}) unless Admin::Setting.find_by_sql("SELECT * FROM admin_settings WHERE group = '#{group}' AND name = '#{name}';").exists? end AddSetting('google', 'analytics_id', '', 'The ID of your Google Analytics account.') AddSetting('general', 'page_title', '', '') AddSetting('general', 'tag_line', '', '') This function is included in the db/seeds.rb file. Is this the right way to do this? However I am getting the following error when I try to run it through rake. rake aborted! Mysql2::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 'group = 'google' AND name = 'analytics_id'' at line 1: SELECT * FROM admin_settings WHERE group = 'google' AND name = 'analytics_id'; Tasks: TOP => db:seed (See full trace by running task with --trace) Process finished with exit code 1 What is confusing me is that I am generating correct SQL as far as I can tell. In fact my code generates the SQL and I pass that to the find_by_sql function for the model, Rails itself can't be changing the SQL, or is it? SELECT * FROM admin_settings WHERE group = 'google' AND name = 'analytics_id'; I've written a lot of SQL over the years and I've looked through similar questions here. Maybe I've missed something, but I cannot see it.

    Read the article

  • Which CSS identifier is used for the selected tab in tabbed tables in browsers other than IE?

    - by David Navarre
    When you have a table on a form in Notes, you can choose to display only one row at a time (via the Special Table Row Display parameter on the Table Rows tab of the Table properties). In a Notes document displayed using Internet Explorer that contains such a table, a row is displayed with a cell for each "tab". The TD that serves as the tab for the selected "Notes table row" is assigned <td class="dominoSelTopTab">, while the other tabs get <td class="dominoTopTab">. However, when using other browsers, it's not nearly as simple. In Firefox, each "tab" ends up as a single-celled-single-row-table within the table with very little to identify it. <td><table border="1" cellpadding="2"> <tr><td><div align="center"><b>Tab 2</b></div></td></tr> </table></td> A non-selected tab would show as follows: <td><table border="1" cellpadding="2"> <tr><td><div align="center"><a name="1." href="/Projects/MyCSS.nsf/0c3b9489476440c085257a62006d97d6/d482a1767a4af77f85257a62006db064?OpenDocument&amp;TableRow=1.0#1." target="_self">Tab 1</a></div></td></tr> </table></td> So, the question is, how do I identify the selected tabs and the non-selected tabs when not using IE? Note: For those who are not Notes developers, the HTML is auto-generated from the visual design as laid out in the Notes designer client. I would replace it all with manual HTML, except there is so much of it that doing so would consume far too much time.

    Read the article

  • OcaIDE doesn't see JoCaml tools

    - by Surikator
    I'm having a problem while using OcaIDE in ocamlbuild mode. I'm trying to compile my own JoCaml sources. According to the JoCaml manual (bottom of page), to use ocamlbuild with JoCaml, I just need to add the -use-jocaml argument to ocamlbuild. Indeed, if I go to the root of my project and write ocamlbuild -use-jocaml foo.native it generates my executable just fine. However, in OcaIDE I get /bin/sh: jocamldep: command not found In OcaIDE, the -use-jocaml flag is passed in the "Other Flags" box (in Project Properties). And that certainly is working, as the complaint is precisely that it doesn't find jocaml stuff. The puzzling thing is that jocaml is installed and can be accessed from any random terminal window. For example, running jocamldep -modules foo.ml > foo.ml.depends on my project does generate the desired dependency file. So, it would seem I would have to configure OcaIDE and tell it where JoCaml executables are or something. This is done for OCaml, for example. But there is no place to do that for JoCaml. And it's really strange that, if jocamldep/jocamlc/etc are all accessible from anywhere, OcaIDE wouldn't be able to pick them. Any ideas? (I am aware I can do an ocamlbuild plugin and pass the flag in a "myocamlbuild.ml" file. I'll probably use that a latter stage after I get familiar with ocamlbuild plugins. But here the question is about OcaIDE. EDIT: Actually, ocamlbuild plugins don't seem to be a solution as, although there is an option -use-jocaml in ocamlbuild to enforce jocaml use (and it works fine), the plugin system doesn't support it, i.e. jocaml is not in the list of options.)

    Read the article

  • Checking Selected Radio Button after POST

    - by coffeeaddict
    I've been using ASP.NET controls which perform a lot of the manual for you. But I'm going back to the basics, what everyone else does. I'm using standard input tags. So for example if I have a radio button group and I select a button. When the form submits and does a POST back to whatever action="MyPage.aspx" then to grab and check the radio button's value that was selected is it always done like this below? <label><input type="radio" name="rbGroup" value='<%# ((Action)Container.DataItem).ID %>'/><%# ((Action)Container.DataItem).Name %></label> So here I'm appending the ID to the value. And then when it hits the page that my action specifies, I'm checking to see which was selected by trimming off and getting that ID from the value: string selection = Request.Form["rbGroup"]; string dbRecordIdSelected = int.Parse(selection.Substring(1)); so now I can check the id they selected...that is the ID of the db record that gave that selected radio it's name. Is that how you basically always check what radio was selected by checking the name/value pair that comes across for that selected radioButton group name? And then you can append stuff like IDs or whatever you want to grab and parse out to then do additional logic on the server-side once that header reaches the server and your specified page in the action attribute? The above code is not production code, just something to explain what I'm talking about.

    Read the article

  • Search for values in nested array

    - by dardub
    I have an array as follows array(2) { ["operator"] => array(2) { ["qty"] => int(2) ["id"] => int(251) } ["accessory209"] => array(2) { ["qty"] => int(1) ["id"] => int(209) } ["accessory211"] => array(2) { ["qty"] => int(1) ["id"] => int(211) } } I'm trying to find a way to verify an id value exists within the array and return bool. I'm trying to figure out a quick way that doesn't require creating a loop. Using the in_array function did not work, and I also read that it is quite slow. In the php manual someone recommended using flip_array() and then isset(), but I can't get it to work for a 2-d array. doing something like if($array['accessory']['id'] == 211) would also work for me, but I need to match all keys containing accessory -- not sure how to do that Anyways, I'm spinning in circles, and could use some help. This seems like it should be easy. Thanks.

    Read the article

  • Help on MySQL table indexing when GROUP BY is used in a query

    - by Silver Light
    Thank you for your attention. There are two INNODB tables: Table authors id INT nickname VARCHAR(50) status ENUM('active', 'blocked') about TEXT Table books author_id INT title VARCHAR(150) I'm running a query against these tables, to get each author and a count of books he has: SELECT a. * , COUNT( b.id ) AS book_count FROM authors AS a, books AS b WHERE a.status != 'blocked' AND b.author_id = a.id GROUP BY a.id ORDER BY a.nickname This query is very slow (takes about 6 seconds to execute). I have an index on books.author_id and it works perfectly, but I do not know how to create an index on authors table, so that this query could use it. Here is how current EXPLAIN looks: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE a ALL PRIMARY,id_status_nickname NULL NULL NULL 3305 Using where; Using temporary; Using filesort 1 SIMPLE b ref key_author_id key_author_id 5 a.id 2 Using where; Using index I've looked at MySQL manual on optimizing queries with group by, but could not figure out how I can apply it on my query. I'll appreciate any help and hints on this - what must be the index structure, so that MySQL could use it?

    Read the article

  • How do you send email from IMAP account with PHP?

    - by arthurakay
    I'm having an issue sending email via PHP/IMAP - and I don't know if it's because: I don't correctly understand IMAP, or there's an issue with my server My application opens an IMAP connection to an email account to read messages in the inbox. It does this successfully. The problem I have is that I want to send messages from this account and have them display in the outbox/sent folder. As far as I can tell, the PHP imap_mail() function doesn't in any way hook into the IMAP stream I currently have open. My code executes without throwing an error. However, the email never arrives to the recipient and never displays in my sent folder. private function createHeaders() { return "MIME-Version: 1.0" . "\r\n" . "Content-type: text/html; charset=iso-8859-1" . "\r\n" . "From: " . $this->accountEmail . "\r\n"; } private function notifyAdminForCompleteSet($urlToCompleteSet) { $message = " <p> In order to process the latest records, you must visit <a href='$urlToCompleteSet'>the website</a> and manually export the set. </p> "; try { imap_mail( $this->adminEmail, "Alert: Manual Export of Records Required", wordwrap($message, 70), $this->createHeaders() ); echo(" ---> Admin notified via email!\n"); } catch (Exception $e) { throw new Exception("Error in notifyAdminForCompleteSet()"); } } I'm guessing I need to copy the message into the IMAP account manually... or is there a different solution to this problem? Also, does it matter if the domain in the "from" address is different than that of the server on whicn this script is running? I can't explain why the message is never sent.

    Read the article

< Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >