Daily Archives

Articles indexed Thursday May 20 2010

Page 25/120 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • TextBox loses text when InvokeRequired == false

    - by Tom
    This is modified code I found on this site. When appending text to a TextBox and InvoveRequired is false the text will display in the box but the next time the function is called and InvokeRequired is true the text string placed by the first call is lost (""). Multiple calls when InvokeRequired is true work as expected. comBox is a type TextBox with multline = true. Any help would be appreciated. public void LogComText(string comText, bool newline) { if (comBox.InvokeRequired) { comBox.BeginInvoke(new Action(delegate { LogComText(comText, newline); })); return; } comBox.AppendText(comText); if (newline) comBox.AppendText(Environment.NewLine); }

    Read the article

  • Are global comment systems a privacy concern?

    - by Stefano Borini
    I more and more see these global login-once comment-everywhere systems on every page. I didn't do my homework of tinkering debugging and search before asking, so my question is as follows: You login on site A and leave a comment. Now you go on site B, which uses the same global comment system. At the bottom of the page a request form with your name and data appears for you to add a comment on B page. You don't leave any comment and browse away. Does the global-comment provider get information about the fact that you visited page B, even if you don't leave any comment ? I will dig into the code as soon as I have time, but in the meanwhile I would like to ask your insights on this regard.

    Read the article

  • how to get latest entry from a table for an item and do arithmatic operation on it?

    - by I Like PHP
    i have below tables tbl_rcv_items st_id | item_id |stock_opening_qnty |stock_received_qnty |stock_rcvd_date 14 1 0 70 2010-05-18 15 16 0 100 2010-05-06 16 10 0 59 2010-05-20 17 14 0 34 2010-05-20 20 1 70 5 2010-05-12 tbl_issu_items issue_id refer_issue_id item_id item_qntt item_updated 51 1 1 5 2010-05-18 19:34:29 52 1 16 6 2010-05-18 19:34:29 53 1 10 7 2010-05-18 19:34:29 54 1 14 8 2010-05-18 19:34:29 75 7 1 12 2010-05-18 19:40:52 76 7 16 1 2010-05-18 19:40:52 77 7 10 1 2010-05-18 19:40:52 78 7 14 1 2010-05-18 19:40:52 79 8 1 3 2010-05-19 11:28:50 80 8 16 5 2010-05-19 11:28:50 81 8 10 6 2010-05-19 11:28:50 82 8 14 7 2010-05-19 11:28:51 87 10 1 2 2010-05-19 12:51:03 88 10 16 0 2010-05-19 12:51:03 89 10 10 0 2010-05-19 12:51:03 90 10 14 0 2010-05-19 12:51:03 91 14 1 1 2010-05-19 18:43:58 92 14 14 3 2010-05-19 18:43:58 tbl_item_detail item_id item_name 1 shirt 2 belt 10 ball pen 14 vim powder 16 pant NOW if i want total available quantity for each item till today using both table total available quantity for an item =stock_opening_qnty+stock_received_qnty(LATEST ENTRY FROM (tbl_rcv_item) for that item id according to stock_rcvd_date) - SUM(item_qntt) for eg: if i want to know the available quantity for item_id=1 till today(25-05-2010) then it shoud be 70+5(latest entry for item_id till 25/5/2010)-23( issued till 25/5/2010)=52 i write below query , SELECT tri.item_id, tid.item_name, (tri.stock_opening_qnty + tri.stock_received_qnty) AS totalRcvQntt, SUM( tii.item_qntt ) AS totalIsudQntt FROM tbl_rcv_items tri JOIN tbl_issu_items tii ON tii.item_id = tri.item_id JOIN tbl_item_detail tid ON tid.item_id=tri.item_id WHERE tri.stock_rcvd_date <= CURDATE() GROUP BY (tri.item_id) which results Array ( [0] => Array ( [item_id] => 1 [item_name] => shirt [totalRcvQntt] => 70 [totalIsudQntt] => 46 ) [1] => Array ( [item_id] => 10 [item_name] => ball pen [totalRcvQntt] => 59 [totalIsudQntt] => 16 ) [2] => Array ( [item_id] => 14 [item_name] => vim powder [totalRcvQntt] => 34 [totalIsudQntt] => 20 ) [3] => Array ( [item_id] => 16 [item_name] => pant [totalRcvQntt] => 100 [totalIsudQntt] => 17 ) ) in above result total isuse quantity for shirt(item_id=1) shoube be 23 whereas results reflects 46 bcoz there are two row regrading item_id=1 in tbl_rcv_items, i only need the latest one(means which stock_rcvd_date is less than tommorow) please tell me where i doing mistake?? or rewrite the best query. thanks a lot!

    Read the article

  • mail script in php

    - by Piyush
    I am hosting my web application(pnpmkt.com) from GODADDY.com they have given me some email account like [email protected]. I want to send welcome message to new user's to their mail account in other mail servers like google, yahoo.for example, my mail function is- <?php $address = "[email protected]"; $Subject = "PNP Solutions"; $body = "Welcome to PNP"; $mailsend = mail("$address", "$Subject", "$body."); print("$mailsend"); ?> what other configurations are required?Any path name or server name??

    Read the article

  • Get consolidated results with following tables

    - by Ted
    I have a scenario. Here's my table structure is: ID LoginDate RemovalDate ---------------------------------------- 1 2009/08/01 NULL 2 2009/09/12 2010/01/02 3 2009/08/31 2009/10/29 4 2010/02/17 NULL 5 2009/10/18 2009/11/22 I want a consolidated results of how many ID's were not removed in a particular month. So the result set should be Date NotRemoved_ID -------------------------- 2009/08 2 2009/09 3 2009/10 3 [One ID got removed in 2009/10] 2010/02 2 [Two got removed in 2009/11 and 2010/01] Please help.

    Read the article

  • ASP.NET data bind two-way, bi-directional from code behind

    - by Konrad
    Hello, so for two-way (bi-directional) databinding in ASP, we do this... <asp:textbox id="txtField" runat="server" text='<%# Bind("SomeField") %>'> </asp:textbox> SomeField is located on the DataSource of the DetailsView that serves as the container for the textbox. Alternatively I could do this from code-behind (using the textbox's OnDataBinding event): protected void SomeField_OnDataBinding(object sender, EventArgs e) { ((TextBox)sender).Text = Eval("SomeField").ToString(); } However, EVAL is read-only...how can I specify Bind (two-way) from code-behind?

    Read the article

  • Is it a good idea to have the operating system on a solid state drive?

    - by Kenji Kina
    There is something I don't quite understand. I know a SSD helps with OS load times, but I'm not sure if all this boost is only noticeable/interesting when booting, or gives an all around considerably better experience thereafter. I am interested in having a quick and responsive environment after booting, which leads me to think that it'd be better to spend the SSD capacity in my most used apps (and the page file? Another inside question) and not the OS itself. This, of course, means that I don't know just how much the OS reads/writes its files during normal usage. So, how good an idea is it to dump the whole 20GB+ of Windows 7 OS into the SSD (considering the hefty price per GB of SSD capacity) if I can put up with the usual hard disk boot times? Would I be missing on a lot if I didn't?

    Read the article

  • Advice for UPC/Surge Protector in home office

    - by user37755
    I'm just starting out as an independant developer, mostly Unix stuff with some Windows thrown in occasionally. I've been running two machines, a linux and a windows dev machine. Long story short, we had a bad storm come through last week and I unplugged one machine, forgot to unplug the other and the p/s and mobo ended up dead. Luckily I backup to an external service religiously (rsync.net for anyone interested), so there was no loss in data, but it did show me a glaring hole in my current setup, namely, lack of UPC and Surge Protection (this has honestly never been an issue before). Can anyone recommend a UPC/Surge Protector for a home office? It only needs to support a single machine (I opted to use vmware instead of rebuilding that machine), but it's a quad core Phenom 2 with a 1k watt p/s. This is outside my experience so I thought I'd get some input from others. I'm looking for something that's reasonably priced and does the job reasonably well. I don't need absolute 100% uptime, just something to protect my PC better than it is now.

    Read the article

  • Facebook promet des paramètres de confidentialités "plus simples", d'ici à deux semaines pour répond

    Mise à jour du 20.05.2010 par Katleen Facebook promet des paramètres de confidentialités "plus simples", d'ici à deux semaines pour répondre à la polémique Suite à la polémique qui ne fait qu'enfler, à propos des paramètres de confidentialité de Facebook, le "Monsieur vie privée" du site s'est exprimé publiquement : «Nos utilisateur nous ont dit que les réglages sont devenus un peu trop complexes. Je pense que nous allons travailler la-dessus. Nous allons proposer des options pour les utilisateurs qui veulent des contrôles plus simples entre lesquels choisir, et je pense que nous allons proposer cela dans les deux prochaines semaines». Bien que claire, cette déclaration reste flou...

    Read the article

  • Ideas for a TLA+ project

    - by luvieere
    Please give me some suggestions regarding a project topic in the TLA+ language. I'm taking a course on the language, it's the first year I'm learning about specification and verification and I have no clue what to choose to implement in two weeks time. Any ideas?

    Read the article

  • Oracle 9i installation problem

    - by newb
    I can not set my oracle home name "OraHome92". Everytime I do it the destination path is changed to "E:\oracle\ora92" but I am instructed to install "D:\oracle\ora92". How can I sove this problem? FYI Facing this problem I installed the oracle with the home name OraHome9. And installl was successful. But after that when started to upgrde to Oracle 9i (9.2.0.6), it was unsuccessful. Waiting for your reply

    Read the article

  • I need to copy only selected files and folders in PHP

    - by OM The Eternity
    I am using the following code, in which initially i am taking the difference of two folder structure and then the out put needs to be copied to other folder. here is the code below.. $source = '/var/www/html/copy1'; $mirror = '/var/www/html/copy2'; function scan_dir_recursive($dir, $rel = null) { $all_paths = array(); $new_paths = scandir($dir); foreach ($new_paths as $path) { if ($path == '.' || $path == '..') { continue; } if ($rel === null) { $path_with_rel = $path; } else { $path_with_rel = $rel . DIRECTORY_SEPARATOR . $path; } $full_path = $dir . DIRECTORY_SEPARATOR . $path; $all_paths[] = $path_with_rel; if (is_dir($full_path)) { $all_paths = array_merge( $all_paths, scan_dir_recursive($full_path, $path_with_rel) ); } } return $all_paths; } $diff_paths = array_diff( scan_dir_recursive($mirror), scan_dir_recursive($source) ); /*$diff_path = array_diff($mirror,$original);*/ echo "<pre>Difference ";print_r($diff_paths); foreach($diff_paths as $path) { echo $source1 = "var/www/html/copy2/".$path; echo "<br>"; $des = "var/www/html/copy1/".$path; copy_recursive_dirs($source1, $des); } function copy_recursive_dirs($dirsource, $dirdest) { $dir_handle=opendir($dirsource); mkdir($dirdest,0777); while(false!==($file=readdir($dir_handle))) {/*echo "<pre>"; print_r($file);*/ if($file!="." && $file!="..") { if(is_dir($dirsource.DIRECTORY_SEPARATOR.$file)) { //Copy the file at the same level in the destination folder copy_recursive_dirs($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$file); } else{ //Copy the dir at the same lavel in the destination folder copy ($dirsource.DIRECTORY_SEPARATOR.$file, $dirdest.DIRECTORY_SEPARATOR.$file); } } } closedir($dir_handle); return true; } Whenever I execute the script I get the difference output but do not get the other copy on second folder as per code... Pls help me in rectifying...

    Read the article

  • Eclipse Error Exporting Web Project as WAR

    - by Anand
    Hi I have the following error when I export my war file org.eclipse.core.runtime.CoreException: Extended Operation failure: org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportOperation at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard.performFinish(DataModelWizard.java:189) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$Export.executeHandler(WizardHandler.java:97) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:273) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171) at org.eclipse.ui.actions.ExportResourcesAction.run(ExportResourcesAction.java:116) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) Caused by: org.eclipse.core.commands.ExecutionException: Error exportingWar File at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation.execute(J2EEArtifactExportOperation.java:131) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:376) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:401) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:352) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:242) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:214) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:202) at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard$1$CatchThrowableRunnableWithProgress.run(DataModelWizard.java:218) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: Error opening archive for export.. at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportOperation.export(WebComponentExportOperation.java:64) at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation.execute(J2EEArtifactExportOperation.java:123) ... 10 more Caused by: org.eclipse.jst.jee.archive.ArchiveSaveFailureException: Error saving archive: WebComponentArchiveLoadAdapter, Component: P/Nautilus2 to output path: D:/Nautilus2.war at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.saveArchive(ArchiveFactoryImpl.java:84) at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation.saveArchive(J2EEArtifactExportOperation.java:306) at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportOperation.export(WebComponentExportOperation.java:50) ... 11 more Caused by: java.io.FileNotFoundException: D:\myproject.war (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.createSaveAdapterForJar(ArchiveFactoryImpl.java:108) at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.saveArchive(ArchiveFactoryImpl.java:74) ... 13 more Contains: Extended Operation failure: org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportOperation org.eclipse.core.commands.ExecutionException: Error exportingWar File at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation.execute(J2EEArtifactExportOperation.java:131) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:376) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:401) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:352) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:242) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:214) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89) at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:202) at org.eclipse.wst.common.frameworks.internal.datamodel.ui.DataModelWizard$1$CatchThrowableRunnableWithProgress.run(DataModelWizard.java:218) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121) Caused by: org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: Error opening archive for export.. at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportOperation.export(WebComponentExportOperation.java:64) at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation.execute(J2EEArtifactExportOperation.java:123) ... 10 more Caused by: org.eclipse.jst.jee.archive.ArchiveSaveFailureException: Error saving archive: WebComponentArchiveLoadAdapter, Component: P/Nautilus2 to output path: D:/Nautilus2.war at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.saveArchive(ArchiveFactoryImpl.java:84) at org.eclipse.jst.j2ee.internal.archive.operations.J2EEArtifactExportOperation.saveArchive(J2EEArtifactExportOperation.java:306) at org.eclipse.jst.j2ee.internal.web.archive.operations.WebComponentExportOperation.export(WebComponentExportOperation.java:50) ... 11 more Caused by: java.io.FileNotFoundException: D:\myproject.war (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(Unknown Source) at java.io.FileOutputStream.(Unknown Source) at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.createSaveAdapterForJar(ArchiveFactoryImpl.java:108) at org.eclipse.jst.jee.archive.internal.ArchiveFactoryImpl.saveArchive(ArchiveFactoryImpl.java:74) ... 13 more Can anyone help me out with this ?

    Read the article

  • Fake output stream type

    - by Jeenu
    By default certain programs format their output according to the type of the stream they write to. For example, the output of ls and ls > file looks differently. I'd like to know how this is achieved by a program. Additionally, is there a way by which we can trick such programs as if the output stream is a terminal where it actually is a file (especially when they don't have any options that affect output formatting)?

    Read the article

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