Daily Archives

Articles indexed Wednesday May 5 2010

Page 27/119 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Druapl & Regular PHP Integration

    - by user333128
    I'm building a new website which has one core application and many content pages. Content pages are mostly dynamic and I require a way to manage this dynamic content on a regular basis. The core application's main functionality is a 3 step process or reading user data (input page), reading data from MySQL (product page) and submitting an application to an email address (application page). Ideally I would like to build the core application in regular PHP and leverage Drupal for its content management capabilities. Can Drupal and regular PHP be integrated as I suggest easily? My feeling is that coding the core application as a Drupal module(s) will add layers of complexity that could be difficult to code from the outset and maintain later on as the system matures - so I would really like to just use regular PHP. Let me explain where dynamic content (managed by the CMS) intersects with the core application: Dynamic content such as FAQ data is used both on the 'normal' help pages and also within a mini-feed displayed within core application pages down a right hand side column. In this column, 3 random questions are pulled from the database and displayed as a feed. When users click on FAQ question they are not taken away from the core application product page but are instead shown data in a pop-up window displaying the question and answer. In addition, users can browse other questions and answers through a simple navigation menu within this popup. There are 3 such like feeds as I describe above that I require on the core application product page. So, what is the ideal solution here in terms of 'keeping things simple' for both the management of dynamic content and the ease of coding the core application? Can 'regular PHP' and Drupal co-exist 'peacefully'? If so, how is this technically possible? Because there is some content managed by Drupal contained within core application pages, can the core application still be coded in regular PHP? Any advice / suggestions? Thank you! Jim.

    Read the article

  • Postsharp installer bug: .Net 2.0 not presented

    - by HeavyWave
    There is an issue with PostSharp 1.5 and 2.0 that won't let you install it on the Windows 7 machine with the error message ".NET Framework 2.0 is not present on this computer". To work around the issue you have to run the installer while being logged in with Administrator account. Not Admin group and not "run as Administrator", you have to be logged in with the Administrator account. Hope that helps, if someone has the same issue.

    Read the article

  • How do you tell that your unit tests are correct?

    - by Jacob Adams
    I've only done minor unit testing at various points in my career. Whenever I start diving into it again, it always troubles me how to prove that my tests are correct. How can I tell that there isn't a bug in my unit test? Usually I end up running the app, proving it works, then using the unit test as a sort of regression test. What is the recommended approach and/or what is the approach you take to this problem? Edit: I also realize that you could write small, granular unit tests that would be easy to understand. However, if you assume that small, granular code is flawless and bulletproof, you could just write small, granular programs and not need unit testing. Edit2: For the arguments "unit testing is for making sure your changes don't break anything" and "this will only happen if the test has the exact same flaw as the code", what if the test overfits? It's possible to pass both good and bad code with a bad test. My main question is what good is unit testing since if your tests can be flawed you can't really improve your confidence in your code, can't really prove your refactoring worked, and can't really prove that you met the specification?

    Read the article

  • Read Resources from a dll

    - by Ramiz Uddin
    Hi, I've two VB7 projects - one is console project and another is winform project. In console project, I've defined some strings in the project resources (project properties Resources tab). I build that console project and get the dll from debug folder and added up as a reference in my winforms project. Now, I need to read those strings from the referenced dll. How? Thanks.

    Read the article

  • Installing Intel Rapid Storage Drivers makes my eSATA Drives act weird

    - by Filip Ekberg
    I have a HP 8530w Elitebook this Laptop got an eSATA port which I want to plug my LaCie d2 Quadra V2 1TB harddrive into. It all works well on a fresh install of Windows 7 without the Intel Chipset drivers installed. However when I install the Intel Rapid Storage drivers or the Intel Matrix software my drive seems to "disconnect" when I use it to much. I have a lot of Virtual PC's on the drive and when I start them the disk somewhat disconnects. What could cause this?

    Read the article

  • Complain about jQuery Tag's

    - by jAndy
    Hi Folks, I'm complaining about the growth of jQuery tagged questions at stackoverflow. There are so many people who ask, 'How to implement a specific plugin?' or 'How to use that plugin?' which makes me kinda sick. IMO: If you Tag a question to jQuery, javascript or C, it should be a question about the language itself and not some 'goofy' little plugin. Best case scenario, Tag those questions with jquery-plugins. I know I'm breaking my own rule along with this post, but I just realized that trend and I'm really interested in other opinions about that. Kind Regards --Andy

    Read the article

  • populate a tree view with an xml file

    - by syedsaleemss
    Im using .net windows form application. I have an xml file.I want to populate a tree view with data from a xml file. I am doing this using the following code. private void button1_Click(object sender, EventArgs e) { try { this.Cursor = System.Windows.Forms.Cursors.WaitCursor; //string strXPath = "languages"; string strRootNode = "Treeview Sample"; OpenFileDialog Dlg = new OpenFileDialog(); Dlg.Filter = "All files(*.*)|*.*|xml file (*.xml)|*.txt"; Dlg.CheckFileExists = true; string xmlfilename = ""; if (Dlg.ShowDialog() == DialogResult.OK) { xmlfilename = Dlg.FileName; } // Load the XML file. //XmlDocument dom = new XmlDocument(); //dom.Load(xmlfilename); XmlDocument doc = new XmlDocument(); doc.Load(xmlfilename); string rootName = doc.SelectSingleNode("/*").Name; textBox4.Text = rootName.ToString(); //XmlNode root = dom.LastChild; //textBox4.Text = root.Name.ToString(); // Load the XML into the TreeView. this.treeView1.Nodes.Clear(); this.treeView1.Nodes.Add(new TreeNode(strRootNode)); TreeNode tNode = new TreeNode(); tNode = this.treeView1.Nodes[0]; XmlNodeList oNodes = doc.SelectNodes(textBox4.Text); XmlNode xNode = oNodes.Item(0).ParentNode; AddNode(ref xNode, ref tNode); this.treeView1.CollapseAll(); this.treeView1.Nodes[0].Expand(); this.Cursor = System.Windows.Forms.Cursors.Default; } catch (Exception ex) { this.Cursor = System.Windows.Forms.Cursors.Default; MessageBox.Show(ex.Message, "Error"); } } private void AddNode(ref XmlNode inXmlNode, ref TreeNode inTreeNode) { // Recursive routine to walk the XML DOM and add its nodes to a TreeView. XmlNode xNode; TreeNode tNode; XmlNodeList nodeList; int i; // Loop through the XML nodes until the leaf is reached. // Add the nodes to the TreeView during the looping process. if (inXmlNode.HasChildNodes) { nodeList = inXmlNode.ChildNodes; for (i = 0; i <= nodeList.Count - 1; i++) { xNode = inXmlNode.ChildNodes[i]; inTreeNode.Nodes.Add(new TreeNode(xNode.Name)); tNode = inTreeNode.Nodes[i]; AddNode(ref xNode, ref tNode); } } else { inTreeNode.Text = inXmlNode.OuterXml.Trim(); } } My xml file is this:"hello.xml" - - abc hello how ru - def i m fine - ghi how abt u Now after using the above code I am able to populate the tree view. But I dont like to populate the complete xml file. I should get only till languages language key value I don't want abc how are you etc..... I mean to say the leaf nodes. Please help me

    Read the article

  • Select a distinct record, filtering is not working..

    - by help_inmssql
    Hello EVery I am new to SQl. query to result in the following records. I have a table with records as c1 c2 c3 c4 c5 c6 1 John 2.3.2010 12:09:54 4 7 99 2 mike 2.3.2010 13:09:59 8 6 88 3 ahmad 2.3.2010 13:09:59 1 9 19 4 Jim 23.3.2010 16:35:14 4 5 99 5 run 23.3.2010 12:09:54 3 8 12 I want to fecth only records. i.e only 1 latest record per day. If both of them happen at the same time, sort by C1.so in 1&3 it should fetch 3. 3 ahmad 2.3.2010 14:09:59 1 9 19 4 Jim 23.3.2010 16:35:14 4 5 99 I have got a new problem in this. If i filter the records based on conditions the last record is missing. I tried many ways but still it is failing. Here update_log is my table. SELECT * FROM update_log t1 WHERE (t1.c3) = ( SELECT MAX(t2.c3) FROM update_log t2 WHERE DATEDIFF(dd,t2.c3, t1.c3) = 0 ) and t1.c3 > '02.03.2010' and t1.modified_at <= '22.03.2010' ORDER BY t1.c3 ASC. But i am not able to retrieve the record 4 Jim 23.3.2010 16:35:14 4 5 99 I dont know this query results in only 3 ahmad 2.3.2010 14:09:59 1 9 19 The format of the column c3 is datetime. I am pumping the data into the column as using $date = date("d.m.Y H:i",time()); -- simple date fetch of today. Another query that i tried for the same purpose. select * from (select convert(varchar(10), c3,104) as date, max(c3) as max_date, max(c1) as Nr from update_log group by convert(varchar(10), c3,104)) as t2 inner join update_log as t1 on (t2.max_date = t1.c3 and convert(varchar(10), c3,104) = date and t1.[c1]= Nr) WHERE t1.c3 >= '02.03.2010' and t1.c3 <= '16.04.2010' . I even tried this way..the same error last record is not coming..

    Read the article

  • Getting "open_basedir restriction in effect" in spite of adding the correct entry.

    - by akshat
    I am trying to create a shared hosting scenario, using open_basedir option of php. I am doing this by adding the following to apache2.conf <VirtualHost *:80> ServerName lt1.example.net DocumentRoot /home/akshat/example/tmpblogs/tb1/ php_admin_value open_basedir /home/akshat/example/tmpblogs/tb1/ </VirtualHost> <VirtualHost *:80> ServerName lt2.example.net DocumentRoot /home/akshat/example/tmpblogs/tb2/ php_admin_flag open_basedir /home/akshat/example/tmpblogs/tb2/ </VirtualHost> Now when I access lt2.example.net, I get the error: Warning: Unknown: open_basedir restriction in effect. File(/home/akshat/example/tmpblogs/tb2/index.php) is not within the allowed path(s): (0) in Unknown on line 0 Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/akshat/example/tmpblogs/tb2/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 I was getting the same error while accessing "lt1.example.net" too, but then it suddenly became alright. What am I doing wrong here?

    Read the article

  • How about the Asp.net processes and threads and apppools?

    - by Michel
    Hi, as i understand, when i load a asp.net .aspx page on the (iis)server, it's processed via the w3p.exe process. But when iis gets multiple requests, are they all processed by the same w3p process? And does this process automaticly use all my processors and cores? And after that: when i start i new thread in my page, this thread still works when the pages is already served to the client. Where does this thread live? also in the w3p.exe process? And what if i assign another apppool to my site, what does that do? Michel

    Read the article

  • TypeLoadException says 'no implementation', but it is implemented

    - by Benjol
    (I spent a few hours yesterday fighting with this problem, couldn't find any solutions here or anywhere else, so I'm adding this here for anyone else who has this problem.) I've got a very weird bug on our test machine. The error is: System.TypeLoadException: Method 'SetShort' in type 'DummyItem' from assembly 'ActiveViewers (...)' does not have an implementation. I just can't understand why - I'm looking at my code, SetShort is there in the DummyItem class, and I've even recompiled a version with writes to the event log just to make sure that it's not a deployment/versioning issue. The weird thing is that the calling code doesn't even call the SetShort method...

    Read the article

  • Choosing a Reporting Services parameter value based on the currently logged in user

    - by Robert Iver
    Here's my situation. I have a Microsoft Reporting Services report that as a parameter takes a salesperson's name and shows them their sales across their territories blah blah blah. But, salesperson A should not be able to choose and view salesperson B's data. So, my thought was to get the currently logged in user from Reporting Services, and then use that to populate the "salesperson" parameter. Is there a way to get the currently logged in user through some hidden RS interface, or is there some other way of accomplishing my goal that I'm just not seeing? Any help would be GREAT, as the higher ups aren't too happen with my (apparent) lack of security right now.

    Read the article

  • How to return the value from MySql Stored Proc ??

    - by karthik
    I am using the below storedproc to generate the Insert statements of a specified table It is build-ed without any errors. Now i want to return the result set in "V_string" as output of the SP DELIMITER $$ DROP PROCEDURE IF EXISTS `demo`.`InsertGenerator` $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `InsertGenerator`() SWL_return: BEGIN -- SQLWAYS_EVAL# to retrieve column specific information -- SQLWAYS_EVAL# table DECLARE v_string NATIONAL VARCHAR(3000); -- SQLWAYS_EVAL# first half -- SQLWAYS_EVAL# tement DECLARE v_stringData NATIONAL VARCHAR(3000); -- SQLWAYS_EVAL# data -- SQLWAYS_EVAL# statement DECLARE v_dataType NATIONAL VARCHAR(1000); -- SQLWAYS_EVAL# -- SQLWAYS_EVAL# columns DECLARE v_colName NATIONAL VARCHAR(50); DECLARE NO_DATA INT DEFAULT 0; DECLARE cursCol CURSOR FOR SELECT column_name,data_type FROM `columns` -- WHERE table_name = v_tableName; WHERE table_name = 'tbl_users'; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN SET NO_DATA = -2; END; DECLARE CONTINUE HANDLER FOR NOT FOUND SET NO_DATA = -1; OPEN cursCol; SET v_string = CONCAT('INSERT ',v_tableName,'('); SET v_stringData = ''; SET NO_DATA = 0; FETCH cursCol INTO v_colName,v_dataType; IF NO_DATA <> 0 then -- NOT SUPPORTED print CONCAT('Table ',@tableName, ' not found, processing skipped.') close cursCol; LEAVE SWL_return; end if; WHILE NO_DATA = 0 DO IF v_dataType in('varchar','char','nchar','nvarchar') then SET v_stringData = CONCAT(v_stringData,'SQLWAYS_EVAL# ll(',v_colName,'SQLWAYS_EVAL# ''+'); ELSE if v_dataType in('text','ntext') then -- SQLWAYS_EVAL# -- SQLWAYS_EVAL# else SET v_stringData = CONCAT(v_stringData,'SQLWAYS_EVAL# ll(cast(',v_colName,'SQLWAYS_EVAL# 00)),'''')+'''''',''+'); ELSE IF v_dataType = 'money' then -- SQLWAYS_EVAL# doesn't get converted -- SQLWAYS_EVAL# implicitly SET v_stringData = CONCAT(v_stringData,'SQLWAYS_EVAL# y,''''''+ isnull(cast(',v_colName,'SQLWAYS_EVAL# 0)),''0.0000'')+''''''),''+'); ELSE IF v_dataType = 'datetime' then SET v_stringData = CONCAT(v_stringData,'SQLWAYS_EVAL# time,''''''+ isnull(cast(',v_colName, 'SQLWAYS_EVAL# 0)),''0'')+''''''),''+'); ELSE IF v_dataType = 'image' then SET v_stringData = CONCAT(v_stringData,'SQLWAYS_EVAL# ll(cast(convert(varbinary,',v_colName, 'SQLWAYS_EVAL# 6)),''0'')+'''''',''+'); ELSE SET v_stringData = CONCAT(v_stringData,'SQLWAYS_EVAL# ll(cast(',v_colName,'SQLWAYS_EVAL# 0)),''0'')+'''''',''+'); end if; end if; end if; end if; end if; SET v_string = CONCAT(v_string,v_colName,','); SET NO_DATA = 0; FETCH cursCol INTO v_colName,v_dataType; END WHILE; END $$ DELIMITER ;

    Read the article

  • Installshield 2009 Premier Basic MSI: Not show a warning message window during uninstall

    - by Samir
    Installshield 2009 Premier Basic MSI: When I uninstall there is a Message Box saying that explorer has to be closed: [Title] My-Product-Name [List] Explorer [radio button 1, Selected by default] Automatically close applications and attempt to restart them after setup is complete [radio button 2] Do not close applications. (A Reboot will be required) [Ok Button] [Cancel Button] If I click OK [with radio button 1 selected] all opened folders are closed !!! How to get rid of this, I don't want any warning message box to show and not close explorer either? More info: I have a dll which is used to show explorer context menu with icons when we right click on any file/folder. This dll is registered during installation and unregistered during uninstall. When we uninstall WinRAR we don't see any such messages, do we?

    Read the article

  • Flex game to build a building

    - by johnraja
    I want to develop a game in flex to build a building. In canvas i want to spirit into number of squares and place a different type of building in that square(Using click and drag). If small building means its take two square and big building means its take four squares. Please anybody help me

    Read the article

  • Using screen, commands like less and man don't clear the screen afterwards

    - by Boldewyn
    In contrast to this question I want the clearing of the screen re-enabled for less. It works fine in my xterm terminal under Cygwin/mintty or Gnome Terminal (both xterms). However, when inside a screen session, the clearing of the screen is somehow disabled. I tried several things, like screen -T xterm or putting the autonuke statement in my ~/.screenrc. Also, inside the screen session export TERM=xterm tset has no effect. So, now I'm out of ideas. Any help appreciated.

    Read the article

  • commad design pattern usage

    - by sagie
    Hi. I've read 3 descriptions of the command design pattern: wikipedia, dofactory and source making. In all of them, the UML shows a relation between the client to the receiver & the concrete command, but no relation to the invoker. But in all 3 examples the client is the one that initiates the invoker and call its Execute method. I think that should be a relation to the invoker as well. Am I missing somthing in here? Maybe even a basic UML knowladge?

    Read the article

  • sql to linq translated code

    - by ognjenb
    SQL: SELECT o.Id, o.OrderNumber, o.Date, d.Name AS 'Distributor', d.Notes AS 'DistrNotes', -- distributer c.Name AS 'Custoer', c.Notes AS 'CustmNotes', -- customer t.Name AS 'Transporter', -- transporter o.InvoiceFile, o.Notes, o.AwbFile, o.TrackingFile, o.Status, o.DeliveryNotification, o.ServiceType, o.ValidityDate, o.DeliveryTime, o.Weight, o.CustomerId, o.CustomerOrderNumber, o.CustomerDate, o.Shipment, o.Payment, o.TransporterId, o.TotalPrice, o.Discount, o.AlreadyPaid, o.Delivered, o.Received, o.OrderEnteredBy, CONCAT(e.Name, ' ', e.Surname) AS 'IBEKO Engineer', o.Confirmed FROM `order` o LEFT JOIN person d ON o.`DistributorId` = d.`Id` LEFT JOIN person c ON o.`CustomerId` = c.Id LEFT JOIN Transporter t ON o.`TransporterId` = t.Id LEFT JOIN IbekoEngineer e ON o.OrderEnteredBy = e.Id LINQ: testEntities6 ordersEntities = new testEntities6(); var orders_query = (from o in ordersEntities.order join pd in ordersEntities.person on o.DistributorId equals pd.Id join pc in ordersEntities.person on o.CustomerId equals pc.Id join t in ordersEntities.transporter on o.TransporterId equals t.Id select new OrdersModel { Id = o.Id, OrderNumber = o.OrderNumber, Date = o.Date, Distributor_Name = pdk.Name, Distributor_Notes = pdk.Notes, Customer_Name = pc.Name, Customer_Notes = pc.Notes, Transporter_Name = t.Name, InvoiceFile = o.InvoiceFile, Notes = o.Notes, AwbFile = o.AwbFile, TrackingFile = o.TrackingFile, Status = o.Status, DeliveryNotification = o.DeliveryNotification, ServiceType = o.ServiceType, ValidityDate = o.ValidityDate, DeliveryTime = o.DeliveryTime, Weight = o.Weight, CustomerId = o.CustomerId, CustomerOrderNumber = o.CustomerOrderNumber, CustomerDate = o.CustomerDate, Shipment = o.Shipment, Payment = o.Payment, TransporterId = o.TransporterId, TotalPrice = o.TotalPrice, Discount = o.Discount, AlreadyPaid = o.AlreadyPaid, Delivered = o.Delivered, Received = o.Received, OrderEnteredBy = o.OrderEnteredBy, Confirmed = o.Confirmed }); I translated the above SQL code into linq. SQL code return data from database but LINQ not return data. Why?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >