Search Results

Search found 1567 results on 63 pages for 'b gen jack o neill'.

Page 37/63 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • NHibernate Mapping + Iset

    - by jack
    Hi all I have a mapping file <set name="Friends" table="Friends"> <key column="UserId"/> <many-to-many class="User" column="FriendId"/> </set> I would like to specify extra columns for the friend table this creates. For example Approve (the user must approve the friend request) Is there a easy way?

    Read the article

  • Problem with java on Windows

    - by Jack
    I had installed jdk-6u18-windows-i586 on my machine. Later on I uninstalled it and installed jdk 1.5.0_13 instead. Now when I do javac -version I get jdk 1.5.0_13 But when I do java -version I get java version "1.6.0_19" How do I fix this?

    Read the article

  • User management, authentication and acl plugin for CakePHP?

    - by Jack
    Hi, I am pretty new to CakePHP, having been using rails for a little while. My question is, can anyone recommend a good user management, authentication and acl plugin or component for Cake? I have come across this one, but it has not been updated since 2008. If not can anyone recommend a good book/tutorial site for this kind of set up? I am more than happy to sit down and write this kind of thing myself, but would rather use a tested community plug-in. Cheers

    Read the article

  • How do I test against a large number of regular expressions quickly and know which one matched?

    - by Jack
    I'm writing a program in .net where the user may provide a large number of regular expressions. For a given string, I need to figure out which regular expression matches that string (if more than one matches, I just need the first one that matches). However, if there are a large number of regular expressions this operation can take a very long time. I was somewhat hoping there would be something similar to flex for .net that would allow me to specify a large number of regular expressions yet quickly (O(n) according to Wikipedia for n = len(input string)) figure out which regular expression matches. Also, I would prefer not to implement my own regular expression engine :).

    Read the article

  • Ignore first line on csv parse Rails

    - by Jack
    Hi, I am using the code from this tutorial to parse a CSV file and add the contents to a database table. How would I ignore the first line of the CSV file? The controller code is below: def csv_import @parsed_file=CSV::Reader.parse(params[:dump][:file]) n = 0 @parsed_file.each do |row| s = Student.new s.name = row[0] s.cid = row[1] s.year_id = find_year_id_from_year_title(row[2]) if s.save n = n+1 GC.start if n%50==0 end flash.now[:message] = "CSV Import Successful, #{n} new students added to the database." end redirect_to(students_url) end

    Read the article

  • Random number from a range in a Bash Script

    - by Jack
    Hi, I need to generate a random port number between 2000-65000 from a shell script. The problem is $RANDOM is only a 16bit number, so im stuck! PORT=$(($RANDOM%63000+2001)) would work nicely if it wasn't for the size limitation. Does anyone have an example of how I can do this, maybe by extracting something from /dev/urandom and getting it within a range? Thanks.

    Read the article

  • Read char from txt file in C++

    - by Jack in the Box
    I have a program that will read the number of rows and columns from a txt file. Also, the program has to read the contents of a 2D array from the same file. Here is the txt file 8 20 * * *** *** 8 and 20 are the number of rows and columns respectively. The spaces and asterisks are the contents of the array, Array[8][20] For example, Array[0][1] = '*' I did make the program reading 8 and 20 as follow: ifstream myFile; myFile.open("life.txt"); if(!myFile) { cout << endl << "Failed to open file"; return 1; } myFile >> rows >> cols; myFile.close(); grid = new char*[rows]; for (int i = 0; i < rows; i++) { grid[i] = new char[cols]; } Now, how to assign the spaces and the asterisks to to the fields in the array? I hope you got the point.

    Read the article

  • how to allocate memory for struct itself, and its members

    - by Jack
    I have this struct: struct foo { char *a; char *b; char *c; char *d; }; it's possible allocate space for struct itself and its members instead of e.g, struct foo f; f.a = malloc(); f.b = malloc(); f.c = malloc(); f.d = malloc(); strcpy(f.a, "a"); strcpy(f.b, "b"); //.. something like this(of couse that it doesn't works): struct foo f = malloc(sizeof(struct f)); strpcy(f.a, "a"); //etc

    Read the article

  • GNU Emacs is crashing with -nw

    - by Jack
    When I run emacs with -nw option, the emacs really open, but I can't do more nothing. As if the user input is blocked and no keyboard signal is received and/or interpreted. I've tried run without load .emacs file and some other behaviors: emacs -nw -Q --no-desktop --debug-ini foo.c But makes no difference and strangely the GUI-version(using Gtk) is working fine. My gnu-emacs version is GNU Emacs 23.3.1 Any help to help to fix it is very appreciated.

    Read the article

  • How to make sure no scripts except those under my own domain, can include the db connection file?

    - by Jack
    I would like to ensure that any scripts that are trying to "include" my database connection file are located under my own domain. I don't want a hacker to include the database connection file to their malicious script and gain access to my database that way. My connection file's name is pretty easy to guess, it's called "connect.php". So without renaming it and taking the security through obscurity route, how can I protect it by making sure all connection requests are made by scripts residing under my own domain name? How can this be checked using PHP?

    Read the article

  • How can I make the Entity data model designer use my database column descriptions?

    - by Jack
    I am using EF4 with Visual Studio 2010. I have a SQL database already created and all my columns are documented with the Description property in SQL management studio. When I create the edmx in Visual Studio, how can I make it read those descriptions and use them to add comments to my generated classes? I know I can use the Summary and LongDescription in the edmx properties but I'm looking for a way to do this without having to copy and paste every description. Thanks!

    Read the article

  • Why this function overloading is not working?

    - by Jack
    class CConfFile { public: CConfFile(const std::string &FileName); ~CConfFile(); ... std::string GetString(const std::string &Section, const std::string &Key); void GetString(const std::string &Section, const std::string &Key, char *Buffer, unsigned int BufferSize); ... } string CConfFile::GetString(const string &Section, const string &Key) { return GetKeyValue(Section, Key); } void GetString(const string &Section, const string &Key, char *Buffer, unsigned int BufferSize) { string Str = GetString(Section, Key); // *** ERROR *** strncpy(Buffer, Str.c_str(), Str.size()); } Why do I get an error too few arguments to function ‘void GetString(const std::string&, const std::string&, char*, unsigned int)' at the second function ? Thanks

    Read the article

  • Fatal error: Call to undefined function mysqli_connect()

    - by Jack
    I have installed WAMP. I am using Tomcat 6 to run my PHP scripts. I am also using JavaBridge.war and I have copied my php scripts into \webapp\JavaBridge\project. I have removed the semicolon from php.ini file before the statements extension=php_mysqli.dll extension=php_mysql.dll I have added C:\wamp\bin into my PATH env variable. I have copied all dll's from C:\wamp\bin\php\php5.3.0\ext into C:\windows\system32 I am still getting this error. Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\apache-tomcat-6.0.26\webapps\JavaBridge\project\pf_query.php on line 534 Note - I dont get this error when I run my PHP script from Apache 2.2.11 of the WAMP package.

    Read the article

  • Best way to update UI from other classes?

    - by Jack
    I've got several nested classes, with the following structure: BackupLocation contains list of BackupClients BackupClients contains a list of BackupVersions BackupVersions contains a list of BackupFiles In my UI - Im populating a combo box with BackupLocations - and have several listboxes for the clients, versions, and files. When processing the BackupLocations - I can update my status bar easily because thats the top level class that the UI creates. But how can I update the status bar and progress bar on each file being processed? Since the BackupFiles are 3 levels deep, I cant see any way to update the UI. The actual processing of the files are within the BackupVersion class - which loads its files. I think it probably has something to do with events and delegates - but am unsure exactly how to proceed with this, any help would be appreciated.

    Read the article

  • What's the best way to access a MS Access database using PHP?

    - by Jack Roscoe
    Hi, I need to access some data from an MS Access database and retrieve some data from it using PHP. I've looked around the web, and found the following line which seems to correctly connect to the database: $conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\wamp\www\data\MYDB.mdb"); However, I have tried to retrieve some data in the following way: $query = "SELECT pageid FROM pages_table"; $result = mysqli_query($conn, $query); $amount_of_pages = 0; if(mysqli_num_rows($result) <= 0) echo "No results found."; else while($row = mysqli_fetch_array($result, MYSQL_ASSOC)) $amount_of_pages++; And was presented with the following errors: Warning: mysqli_query() expects parameter 1 to be mysqli, object given in C:\wamp\www\data\index.php on line 19 Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in C:\wamp\www\data\index.php on line 23 No results found. I don't really understand the connection to the Access database, is there something I should be doing differently? Thanks in advance for any help.

    Read the article

  • How to use $.get data to replace certain elements in a webpage?

    - by Jack Ha
    I'm using jQuery 1.4.2 to navigate smoothly between similar webpages (in ff3). When clicking on a link, a javascript script should load the new html, filter out the right elements and replace them on the current page. It looks like the $(htmlcode) does not do the thing I expected. The actions below work when loading the page directly, but when using the $.get I have the following problems: the find function seems only to look inside a div element called id="page", which is inside the body element one of the elements has <script>...</script>, but the <script>...</script> is not present in the DOM of $(htmlcode). Anybody knows how to solve this? $.get( url, function(responseText, textStatus, xmlHttpRequest) { alert($(responseText).find("#header")); // works, #header is inside div#page alert($(responseText).find("#header").html()); // displays content, but WITHOUT the <script>...</script> alert($(responseText).find("title")); // does not work, title is outside div#page } );

    Read the article

  • Jquery: Incrimentation for each set of elements in more than 1 div

    - by Jack
    I'm making a Jquery slideshow. It lists thumbnails, that when clicked on, reveal the large image as an overlay. To match up the thumbs with the large images I'm adding attributes to each thumbnail and large image. The attributes contain a number which matches each thumb to its corresponding large image. It works when one slideshow is present on a page. But I want it to work if more than one slideshow is present. Here's the code for adding attributes to thumbs and large images: thumbNo = 0; largeNo = 0; $(this + '.slideshow_content .thumbs img').each(function() { thumbNo++; $(this).attr('thumbimage', thumbNo); $(this).attr("title", "Enter image gallery"); }); $(this + '.slideshow_content .image_container .holder img').each(function() { largeNo++; $(this).addClass('largeImage' + largeNo); }); This works. To make the incrementation work when there are two slideshows on a page, I thought I could stick this code in an each function... $('.slideshow').each(function() { thumbNo = 0; largeNo = 0; $(this + '.slideshow_content .thumbs img').each(function() { thumbNo++; $(this).attr('thumbimage', thumbNo); $(this).attr("title", "Enter image gallery"); }); $(this + '.slideshow_content .image_container .holder img').each(function() { largeNo++; $(this).addClass('largeImage' + largeNo); }); }); The problem with this is that the incrimenting operator does not reset for the second slideshow div (.slideshow), so I end up with thumbs in the first .slideshow div being numbered 1,2,3 etc.. and thumbs in the second .slideshow div being numbered 4,5,6 etc. How do I make the numbers in the second .slideshow div reset and start from 1 again? This is really hard to explain concisely. I hope someone gets the gist.

    Read the article

  • Is it possible to manipulate the format on a DataGridView that is bound to a Data Source?

    - by Jack Johnstone
    I´m using SQL Server 2005 and Visual Studio 2008, C#. In the data source (the SQL Server data table) I use the date format mm/dd/yyyy, however, in a forms overview (DataGridView) users would like to see a completely other format, with year, week number and day number of week (yyww,d). I´ve created an algorithm for this transformation, but can I populate the affected cells with yyww,d instead of mm/dd/yyyy? And in that case - how would I do it? I guess I need to do it after the cells are populated, but before they are shown. The generic question is - how do I manipulate the format of Data Source bound DataGridView cells.

    Read the article

  • How can I get the search parameters from jqgrid in the server side?

    - by Jack
    I've been visiting this forum a lot without registering since several months ago, and I really like it. So, thanks in advance to all the members. Now I'd like to make my first question. I've been using Jqgrid for a few time, and I've managed to have it display the rows and buttons, but now I need to do a search, a complex one, and I thought that "automatically" jqgrid would send the parameters to the server, I mean: sField, searchField, sOper, searchOper, sValue, searchString, sFilter and/or filters I'm not sure at all which ones it has to send, and I thought it would be just the same as it sends 'page', 'rows' and 'sord'. But I'm missing something, because, for example, I can get 'page', 'rows' and 'sord' using: $limit = $this->getRequest()->getParam('rows', 10); but I get nothing by using: $params = $_REQUEST['filters'] or $params = $this->getRequest()->getParam('sFilter'); I'm using PHP, Zend and json. I didn't post any code because my doubt is kind of generic, but I will do it if it was needed. I've searched a lot, and read the documentation, but I just don't see it. I will appreciate your help, thanks!

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >