Search Results

Search found 258 results on 11 pages for 'fax'.

Page 11/11 | < Previous Page | 7 8 9 10 11 

  • Windows Start Menu Not Staying on Top

    - by Jeff Rapp
    Hey everyone. I've had this problem since Windows Vista. I did a clean install with Windows 7 and hoped it would fix the problem. Also swapped out the video card just to rule out a strange driver issue. Here's what's happening. After running for some period of time (usually a few hours), the Start button/orb will loose it's "Chrome" and turn into a plain button that just says "Start." It will work fine for a while, but then the start menu will just stop showing. Additionally, when I hit Win+D to show the desktop, the entire taskbar completely disappears. I can get it back usually by moving/minimizing windows that may be overlapping where the start menu should show. Otherwise, it requires either a full reboot or I'll end up killing & restarting the explorer.exe process. I realize that this is a strange issue - I took a video of it http://www.youtube.com/watch?v=0B3WwT0uyr4 Thanks! --Edit-- Here's my HijackThis log: Logfile of Trend Micro HijackThis v2.0.3 (BETA) Scan saved at 4:19:00 PM, on 12/16/2009 Platform: Unknown Windows (WinNT 6.01.3504) MSIE: Internet Explorer v8.00 (8.00.7600.16385) Boot mode: Normal Running processes: C:\Program Files (x86)\Pantone\hueyPRO\hueyPROTray.exe C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\acrotray.exe C:\Program Files (x86)\iTunes\iTunesHelper.exe C:\Program Files (x86)\Java\jre6\bin\jusched.exe C:\Program Files (x86)\MagicDisc\MagicDisc.exe C:\Program Files (x86)\Trillian\trillian.exe C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\9.0\WebDev.WebServer.EXE C:\Program Files (x86)\Notepad++\notepad++.exe C:\Program Files (x86)\Fiddler2\Fiddler.exe C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\mspdbsrv.exe C:\Program Files (x86)\iTunes\iTunes.exe C:\Program Files (x86)\Adobe\Adobe Illustrator CS4\Support Files\Contents\Windows\Illustrator.exe C:\Program Files (x86)\ColorPic 4.1\ColorPic.exe C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe C:\Program Files (x86)\Common Files\Microsoft Shared\Help 9\dexplore.exe C:\Program Files (x86)\Common Files\Microsoft Shared\Help 9\dexplore.exe C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe C:\Program Files (x86)\eBay\Blackthorne\bin\BT.exe C:\Program Files (x86)\Internet Explorer\IEXPLORE.EXE C:\Program Files (x86)\CamStudio\Recorder.exe C:\Program Files (x86)\CamStudio\Playplus.exe C:\Program Files (x86)\Mozilla Firefox 3.6 Beta 3\firefox.exe C:\Program Files (x86)\CamStudio\Playplus.exe C:\Program Files (x86)\PuTTY\putty.exe C:\Program Files (x86)\CamStudio\Playplus.exe C:\Program Files (x86)\CamStudio\Playplus.exe C:\Program Files (x86)\TrendMicro\HiJackThis\HiJackThis.exe R1 - HKCU\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896 R0 - HKCU\Software\Microsoft\Internet Explorer\Main,Start Page = http://go.microsoft.com/fwlink/?LinkId=69157 R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Page_URL = http://go.microsoft.com/fwlink/?LinkId=69157 R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Default_Search_URL = http://go.microsoft.com/fwlink/?LinkId=54896 R1 - HKLM\Software\Microsoft\Internet Explorer\Main,Search Page = http://go.microsoft.com/fwlink/?LinkId=54896 R0 - HKLM\Software\Microsoft\Internet Explorer\Main,Start Page = http://go.microsoft.com/fwlink/?LinkId=69157 R0 - HKLM\Software\Microsoft\Internet Explorer\Search,SearchAssistant = R0 - HKLM\Software\Microsoft\Internet Explorer\Search,CustomizeSearch = R0 - HKLM\Software\Microsoft\Internet Explorer\Main,Local Page = C:\Windows\SysWOW64\blank.htm R0 - HKCU\Software\Microsoft\Internet Explorer\Toolbar,LinksFolderName = F2 - REG:system.ini: UserInit=userinit.exe O2 - BHO: ContributeBHO Class - {074C1DC5-9320-4A9A-947D-C042949C6216} - C:\Program Files (x86)\Adobe\/Adobe Contribute CS4/contributeieplugin.dll O2 - BHO: AcroIEHelperStub - {18DF081C-E8AD-4283-A596-FA578C2EBDC3} - C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEHelperShim.dll O2 - BHO: Groove GFS Browser Helper - {72853161-30C5-4D22-B7F9-0BBC1D38A37E} - C:\PROGRA~2\MICROS~1\Office14\GROOVEEX.DLL O2 - BHO: Windows Live Sign-in Helper - {9030D464-4C02-4ABF-8ECC-5164760863C6} - C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live\WindowsLiveLogin.dll O2 - BHO: Adobe PDF Conversion Toolbar Helper - {AE7CD045-E861-484f-8273-0445EE161910} - C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll O2 - BHO: URLRedirectionBHO - {B4F3A835-0E21-4959-BA22-42B3008E02FF} - C:\PROGRA~2\MICROS~1\Office14\URLREDIR.DLL O2 - BHO: Java(tm) Plug-In 2 SSV Helper - {DBC80044-A445-435b-BC74-9C25C1C588A9} - C:\Program Files (x86)\Java\jre6\bin\jp2ssv.dll O2 - BHO: SmartSelect - {F4971EE7-DAA0-4053-9964-665D8EE6A077} - C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll O3 - Toolbar: Adobe PDF - {47833539-D0C5-4125-9FA8-0819E2EAAC93} - C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll O3 - Toolbar: Contribute Toolbar - {517BDDE4-E3A7-4570-B21E-2B52B6139FC7} - C:\Program Files (x86)\Adobe\/Adobe Contribute CS4/contributeieplugin.dll O4 - HKLM\..\Run: [AdobeCS4ServiceManager] "C:\Program Files (x86)\Common Files\Adobe\CS4ServiceManager\CS4ServiceManager.exe" -launchedbylogin O4 - HKLM\..\Run: [Adobe Acrobat Speed Launcher] "C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrobat_sl.exe" O4 - HKLM\..\Run: [Acrobat Assistant 8.0] "C:\Program Files (x86)\Adobe\Acrobat 9.0\Acrobat\Acrotray.exe" O4 - HKLM\..\Run: [Adobe_ID0ENQBO] C:\PROGRA~2\COMMON~1\Adobe\ADOBEV~1\Server\bin\VERSIO~2.EXE O4 - HKLM\..\Run: [QuickTime Task] "C:\Program Files (x86)\QuickTime\QTTask.exe" -atboottime O4 - HKLM\..\Run: [iTunesHelper] "C:\Program Files (x86)\iTunes\iTunesHelper.exe" O4 - HKLM\..\Run: [SunJavaUpdateSched] "C:\Program Files (x86)\Java\jre6\bin\jusched.exe" O4 - HKUS\S-1-5-19\..\Run: [Sidebar] %ProgramFiles%\Windows Sidebar\Sidebar.exe /autoRun (User 'LOCAL SERVICE') O4 - HKUS\S-1-5-19\..\RunOnce: [mctadmin] C:\Windows\System32\mctadmin.exe (User 'LOCAL SERVICE') O4 - HKUS\S-1-5-20\..\Run: [Sidebar] %ProgramFiles%\Windows Sidebar\Sidebar.exe /autoRun (User 'NETWORK SERVICE') O4 - HKUS\S-1-5-20\..\RunOnce: [mctadmin] C:\Windows\System32\mctadmin.exe (User 'NETWORK SERVICE') O4 - Startup: ChatNowDesktop.appref-ms O4 - Startup: MagicDisc.lnk = C:\Program Files (x86)\MagicDisc\MagicDisc.exe O4 - Startup: Trillian.lnk = C:\Program Files (x86)\Trillian\trillian.exe O4 - Global Startup: Digsby.lnk = C:\Program Files (x86)\Digsby\digsby.exe O4 - Global Startup: hueyPROTray.lnk = C:\Program Files (x86)\Pantone\hueyPRO\hueyPROTray.exe O4 - Global Startup: OfficeSAS.lnk = ? O8 - Extra context menu item: Append Link Target to Existing PDF - res://C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll/AcroIEAppendSelLinks.html O8 - Extra context menu item: Append to Existing PDF - res://C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll/AcroIEAppend.html O8 - Extra context menu item: Convert Link Target to Adobe PDF - res://C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll/AcroIECaptureSelLinks.html O8 - Extra context menu item: Convert to Adobe PDF - res://C:\Program Files (x86)\Common Files\Adobe\Acrobat\ActiveX\AcroIEFavClient.dll/AcroIECapture.html O8 - Extra context menu item: E&xport to Microsoft Excel - res://C:\PROGRA~1\MICROS~1\Office14\EXCEL.EXE/3000 O8 - Extra context menu item: S&end to OneNote - res://C:\PROGRA~1\MICROS~1\Office14\ONBttnIE.dll/105 O9 - Extra button: Send to OneNote - {2670000A-7350-4f3c-8081-5663EE0C6C49} - C:\Program Files (x86)\Microsoft Office\Office14\ONBttnIE.dll O9 - Extra 'Tools' menuitem: Se&nd to OneNote - {2670000A-7350-4f3c-8081-5663EE0C6C49} - C:\Program Files (x86)\Microsoft Office\Office14\ONBttnIE.dll O9 - Extra button: OneNote Lin&ked Notes - {789FE86F-6FC4-46A1-9849-EDE0DB0C95CA} - C:\Program Files (x86)\Microsoft Office\Office14\ONBttnIELinkedNotes.dll O9 - Extra 'Tools' menuitem: OneNote Lin&ked Notes - {789FE86F-6FC4-46A1-9849-EDE0DB0C95CA} - C:\Program Files (x86)\Microsoft Office\Office14\ONBttnIELinkedNotes.dll O9 - Extra button: Fiddler2 - {CF819DA3-9882-4944-ADF5-6EF17ECF3C6E} - "C:\Program Files (x86)\Fiddler2\Fiddler.exe" (file missing) O9 - Extra 'Tools' menuitem: Fiddler2 - {CF819DA3-9882-4944-ADF5-6EF17ECF3C6E} - "C:\Program Files (x86)\Fiddler2\Fiddler.exe" (file missing) O13 - Gopher Prefix: O16 - DPF: {5554DCB0-700B-498D-9B58-4E40E5814405} (RSClientPrint 2008 Class) - http://reportserver/Reports/Reserved.ReportViewerWebControl.axd?ReportSession=oxadkhfvfvt1hzf2eh3y1ay2&ControlID=b89e27f15e734f3faee1308eebdfab2a&Culture=1033&UICulture=9&ReportStack=1&OpType=PrintCab&Arch=X86 O16 - DPF: {82774781-8F4E-11D1-AB1C-0000F8773BF0} (DLC Class) - https://transfers.ds.microsoft.com/FTM/TransferSource/grTransferCtrl.cab O16 - DPF: {D27CDB6E-AE6D-11CF-96B8-444553540000} (Shockwave Flash Object) - http://fpdownload2.macromedia.com/get/shockwave/cabs/flash/swflash.cab O17 - HKLM\System\CCS\Services\Tcpip\Parameters: Domain = LapkoSoft.local O17 - HKLM\System\CCS\Services\Tcpip\..\{5992B87A-643B-4385-A914-249B98BF7129}: NameServer = 192.168.1.10 O17 - HKLM\System\CS1\Services\Tcpip\Parameters: Domain = LapkoSoft.local O17 - HKLM\System\CS2\Services\Tcpip\Parameters: Domain = LapkoSoft.local O18 - Filter hijack: text/xml - {807573E5-5146-11D5-A672-00B0D022E945} - C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\MSOXMLMF.DLL O23 - Service: Adobe Version Cue CS4 - Adobe Systems Incorporated - C:\Program Files (x86)\Common Files\Adobe\Adobe Version Cue CS4\Server\bin\VersionCueCS4.exe O23 - Service: @%SystemRoot%\system32\Alg.exe,-112 (ALG) - Unknown owner - C:\Windows\System32\alg.exe (file missing) O23 - Service: Apple Mobile Device - Apple Inc. - C:\Program Files (x86)\Common Files\Apple\Mobile Device Support\bin\AppleMobileDeviceService.exe O23 - Service: ASP.NET State Service (aspnet_state) - Unknown owner - C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_state.exe (file missing) O23 - Service: Bonjour Service - Apple Inc. - C:\Program Files (x86)\Bonjour\mDNSResponder.exe O23 - Service: @%SystemRoot%\system32\efssvc.dll,-100 (EFS) - Unknown owner - C:\Windows\System32\lsass.exe (file missing) O23 - Service: @%systemroot%\system32\fxsresm.dll,-118 (Fax) - Unknown owner - C:\Windows\system32\fxssvc.exe (file missing) O23 - Service: FLEXnet Licensing Service - Acresso Software Inc. - C:\Program Files (x86)\Common Files\Macrovision Shared\FLEXnet Publisher\FNPLicensingService.exe O23 - Service: FLEXnet Licensing Service 64 - Acresso Software Inc. - C:\Program Files\Common Files\Macrovision Shared\FLEXnet Publisher\FNPLicensingService64.exe O23 - Service: @%windir%\system32\inetsrv\iisres.dll,-30007 (IISADMIN) - Unknown owner - C:\Windows\system32\inetsrv\inetinfo.exe (file missing) O23 - Service: iPod Service - Apple Inc. - C:\Program Files\iPod\bin\iPodService.exe O23 - Service: @keyiso.dll,-100 (KeyIso) - Unknown owner - C:\Windows\system32\lsass.exe (file missing) O23 - Service: @comres.dll,-2797 (MSDTC) - Unknown owner - C:\Windows\System32\msdtc.exe (file missing) O23 - Service: @%SystemRoot%\System32\netlogon.dll,-102 (Netlogon) - Unknown owner - C:\Windows\system32\lsass.exe (file missing) O23 - Service: NVIDIA Performance Driver Service - Unknown owner - C:\Program Files\NVIDIA Corporation\Performance Drivers\nvPDsvc.exe O23 - Service: NVIDIA Display Driver Service (nvsvc) - Unknown owner - C:\Windows\system32\nvvsvc.exe (file missing) O23 - Service: @%systemroot%\system32\psbase.dll,-300 (ProtectedStorage) - Unknown owner - C:\Windows\system32\lsass.exe (file missing) O23 - Service: @%systemroot%\system32\Locator.exe,-2 (RpcLocator) - Unknown owner - C:\Windows\system32\locator.exe (file missing) O23 - Service: @%SystemRoot%\system32\samsrv.dll,-1 (SamSs) - Unknown owner - C:\Windows\system32\lsass.exe (file missing) O23 - Service: @%SystemRoot%\system32\snmptrap.exe,-3 (SNMPTRAP) - Unknown owner - C:\Windows\System32\snmptrap.exe (file missing) O23 - Service: @%systemroot%\system32\spoolsv.exe,-1 (Spooler) - Unknown owner - C:\Windows\System32\spoolsv.exe (file missing) O23 - Service: @%SystemRoot%\system32\sppsvc.exe,-101 (sppsvc) - Unknown owner - C:\Windows\system32\sppsvc.exe (file missing) O23 - Service: TeamViewer 5 (TeamViewer5) - TeamViewer GmbH - C:\Program Files (x86)\TeamViewer\Version5\TeamViewer_Service.exe O23 - Service: @%SystemRoot%\system32\ui0detect.exe,-101 (UI0Detect) - Unknown owner - C:\Windows\system32\UI0Detect.exe (file missing) O23 - Service: @%SystemRoot%\system32\vaultsvc.dll,-1003 (VaultSvc) - Unknown owner - C:\Windows\system32\lsass.exe (file missing) O23 - Service: @%SystemRoot%\system32\vds.exe,-100 (vds) - Unknown owner - C:\Windows\System32\vds.exe (file missing) O23 - Service: @%systemroot%\system32\vssvc.exe,-102 (VSS) - Unknown owner - C:\Windows\system32\vssvc.exe (file missing) O23 - Service: @%systemroot%\system32\wbengine.exe,-104 (wbengine) - Unknown owner - C:\Windows\system32\wbengine.exe (file missing) O23 - Service: @%Systemroot%\system32\wbem\wmiapsrv.exe,-110 (wmiApSrv) - Unknown owner - C:\Windows\system32\wbem\WmiApSrv.exe (file missing) O23 - Service: @%PROGRAMFILES%\Windows Media Player\wmpnetwk.exe,-101 (WMPNetworkSvc) - Unknown owner - C:\Program Files (x86)\Windows Media Player\wmpnetwk.exe (file missing)

    Read the article

  • I am trying to insert value from combo box to database !! but this is not working

    - by user3675488
    At first I have taken some string in which I am trying to save the input values of textboxs and there is a combo box, I am trying to save the input value of the combo box to database, but this following code is unable to do that !!! what is the prob please help me. private void OK_Click(object sender, EventArgs e) { string sTxtcmpnyName = ""; string sTxtcmpnyAdd = ""; string sPhoneno = ""; string sTxtFax = ""; string sPanNo = ""; string sTxtTin = ""; string sTax = ""; string sAccYr = ""; string sComboSt = ""; foreach (Control c in this.Controls) ////*Adding Validation to the textbox.*// // Here the control is entered into GroupBox Grpcmp where c is denoting the name of the control into the groupbox. { // c1 is another control which denotes the textboxes under the GroupBox Grpcmp. foreach (Control c1 in c.Controls) { /////Now this following code snippets reperesents that the name of the company should not be blank. if (c1 is TextBox == true) // simpler that what you've done there { TextBox temp = (TextBox)c1; //The control is entering into Txtcompany. if (temp.Name == "Txtcompanyname") { //Condition checking is the TextBox is empty or Null then the following message will be shown. if ((temp.Text == "") || (temp.Text == "NULL")) { MessageBox.Show("Company Name should not be Blank"); } sTxtcmpnyName = temp.Text; } else if (c1.Name == "TxtcompanyAddress") { sTxtcmpnyAdd = c1.Text; } else if (c1.Name == "Txtphoneno") { sPhoneno = c1.Text; } else if (c1.Name == "TxtFax ") { sTxtFax = c1.Text; } else if (c1.Name == "Txtpanno") { sPanNo = c1.Text; } else if (c1.Name == "TxtTin") { sTxtTin = c1.Text; } else if (c1.Name == "Txtservicetax") { sTax = c1.Text; } //Now I am converting the TxtAcYr into Date format. //For this purpose two conditions are checked first. //First If the TextBox TxtAcYr is Null or empty it will show the message to enter the accountyear!! //Second If the length of the TextBox TxtAcYr is less than 10, it will again generate a message The date format should be in DD/MM/YYYY // Then the value of the use input will be picked using a For loop. if (c1.Name == "TxtAcYr") { sAccYr = c1.Text; //Here a string is taken named as yearlength and the value of the TxtAcYr is assigned to it by using control c1. //Condition Checking If the TextBox TxtAcYr is Null or empty it will show the message to enter the accountyear!! if ((c1.Text == "") || (c1.Text == "NULL")) { MessageBox.Show("Account Year should be entered!!"); } //Condition 2 is checking. Here the length of the string yearlength is whether equals to 10 or not is checked. //Because there are total 10 characters in Date Format along with special character. else // MessageBox.Show(yearlength.Length.ToString()); if (sAccYr.Length != 10) { MessageBox.Show("The Data Format DD-MM-YYYY"); } //Now the value of user will be picked by using the code snippets. else { //A string named as JK is taken for further use. String JK = ""; //This following loop is initiated to pick the user input. //The loop will check wheather the value of i is less than the length of string yearlength or not. //If Yes then it will go further. for (int i = 0; i < sAccYr.Length; i++) { //This condition is checking special characters. //The positions of special characters(Here '-') are placed at 2nd and 5th numbers. //So, the value of i can not be equals to 2 && 5. if ((i != 2) && (i != 5)) { //The new of value of year length i is assinged to the variable JK. JK = JK + sAccYr[i]; } //If the value of i is equals to 1, then enter the following. if (i == 1) { //*Should add the function of TOInt32* // If ToInt32(JK)>= the maximum length of days of a month then the following alert message will be shown. if (Convert.ToInt32(JK) >= 32) { MessageBox.Show("The Data Format DD-MM-YYYY"); } //**Comment should be added.** JK = ""; } else //If the value of i is equals to 4, then enter the following. if (i == 4) { //*Should add the function of TOInt32* // If ToInt32(JK)>= the maximum length of month then the following alert message will be shown. if (Convert.ToInt32(JK) >= 13) { MessageBox.Show("The Data Format DD-MM-YYYY"); } JK = ""; } } } } } else if (c1.Name == "state_cmb") { //sTxttate = c1.Text.ToString(); sComboSt = c1.Text; MessageBox.Show(c1.Text); } } } //////DATABASE CONNECTION///// try { SqlConnection conn = new SqlConnection(); SqlCommand cmd = new SqlCommand(); conn.ConnectionString = ("Data Source =192.168.0.2 ;database= Mee_Company; Persist Security Info =true; User ID =sa;Password = soso654321@"); conn.Open(); cmd.CommandText = ("INSERT INTO CompanyMaster(CompanyName,Address,State,Phone,Fax,PAN,TIN,STAX,AccountsYear)values('" + sTxtcmpnyName + "','" + sTxtcmpnyAdd + "','" + sComboSt + "','" + sPhoneno + "','" + sTxtFax + "','" + sPanNo + "','" + sTxtTin + "','" + sTax + "','" + sAccYr + "')"); //('" + sTxtcmpnyName + "', '" + TxtcompanyAddress.Text + "', '" + Txtphoneno.Text + "', '" + TxtFax.Text + "', '" + Txtservicetax.Text + "','" + TxtAcYr.Text + "')"); cmd.Connection = conn; cmd.ExecuteNonQuery(); conn.Close(); //cmd.Parameters.AddWithValue } catch (Exception ee) { MessageBox.Show(ee.ToString()); } } //An event is created here so that when the user will click on the Cancel Button, the Form will be closed. private void BtmCancle_Click(object sender, EventArgs e) { //this means the form. this.Close(); } //Another Event is created here named as TxtAcYr_KeyPress. //It is for making the TextBox TxtAcYr only allowance of numeric input along with special character '-'. private void TxtAcYr_KeyPress(object sender, KeyPressEventArgs e) { //If the input is number or '-' is checked //And also the backspace and delete option is enabled here. if (char.IsNumber(e.KeyChar) || e.KeyChar == (char)Keys.Back || e.KeyChar == (char)Keys.Delete || e.KeyChar == '-') { e.Handled = false; //ok } else { e.Handled = true; //not ok } }

    Read the article

  • Sorting linked lists in Pascal

    - by user3712174
    I'm doing my final project for Informatics class and I can't get my sorting procedure to work. Have a look at my program, specifically the bolded part (some things are in Croatian. - if you need something translated, let me know): type pokazivac=^slog; slog=record prezime_ime:string[30]; redni_broj:string[2]; fakultet:string[50]; bodovi:integer; sljedeci:pokazivac; end; var pocetni, trenutni, prethodni:pokazivac; i:integer; procedure racunaj; var i,a,c:integer; b,d,e,f,g,h,j:real; begin write('Postotak bodova (u decimalnom zapisu) koje ucenik ostvaruje na temelju prosjeka ocjena - '); readln(e); e:=e*1000/4; write('Prosjek ocjena u prvom razredu : '); readln(f); f:=f/5*e; write('Prosjek ocjena u drugom razredu : '); readln(g); g:=g/5*e; write('Prosjek ocjena u trecem razredu : '); readln(h); h:=h/5*e; write('Prosjek ocjena u cetvrtom razredu : '); readln(j); j:=j/5*e; d:=f+g+h+j; write('Broj predmeta (ne racunajuci hrvatski jezik, strani jezik i matematiku) koju je ucenik/ca polagao na maturi - '); readln(a); write('Postotak rijesnosti ispita iz hrvatskog jezika te zatim maksimum bodova koje je ucenik/ca mogao ostvariti - '); readln(b); readln(c); d:=d+b*c; write('Postotak rijesnosti ispita iz stranog jezika te zatim maksimum bodova koje je ucenik/ca mogao ostvariti - '); readln(b); readln(c); d:=d+(b*c); write('Postotak rijesnosti ispita iz matematike te zatim maksimum bodova koje je ucenik/ca mogao ostvariti - '); readln(b); readln(c); d:=d+(b*c); for i:=1 to a do begin writeln('Postotak rijesnosti dodatnog predmeta te zatim maksimum bodova koje je ucenik/ca mogao ostvariti - '); readln(b); readln(c); d:=d+(b*c); end; d:=round(d); writeln('Vas broj bodova je: ', d:4:2); write('Za nastavak pritisnite ENTER..'); readln; end; procedure unos; begin new(trenutni); write('Redni broj ucenika - ');readln(trenutni^.redni_broj); write('Prezime i ime - ');readln(trenutni^.prezime_ime); write('Naziv fakultet - ');readln(trenutni^.fakultet); write('Bodovi - ');readln(trenutni^.bodovi); trenutni^.sljedeci:=pocetni; pocetni:=trenutni; end; procedure ispis; begin writeln(); writeln('Lista popisanih ucenika:'); writeln(); trenutni:=pocetni; while trenutni<>NIL do begin with trenutni^do begin writeln('IME: ',prezime_ime); writeln('FAKULTET: ',fakultet); writeln('BODOVI: ',bodovi); writeln(); end; trenutni:=trenutni^.sljedeci; end; writeln(); write('Za nastavak pritisnite ENTER..'); readln; end; procedure brisi; var s:string; begin trenutni:= pocetni; prethodni:=pocetni; write('Redni broj ucenika kojeg zelite izbrisati - '); readln(s); while trenutni<>NIL do begin if trenutni^.redni_broj=s then begin prethodni^.sljedeci:=trenutni^.sljedeci; dispose(trenutni); break; end; trenutni:=trenutni^.sljedeci; end; end; procedure izmjeni; var s:string; begin trenutni:=pocetni; write('Redni broj ucenika cije podatke zelite izmijeniti - '); readln(s); while trenutni<> NIL do begin if trenutni^.redni_broj=s then begin write(trenutni^.prezime_ime, ' - '); readln(trenutni^.prezime_ime); write(trenutni^.fakultet, ' - '); readln(trenutni^.fakultet); write(trenutni^.bodovi, ' - '); readln(trenutni^.bodovi); break; end; trenutni:=trenutni^.sljedeci; end; end; **procedure sortiraj; var t1,t2,t:pokazivac; begin t1:=pocetni; while t1 <> NIL do begin t2:=t1^.sljedeci; while t2<>NIL do if t2^.bodovi<t1^.bodovi then begin new(t); t^.redni_broj:=t1^.redni_broj; t^.prezime_ime:=t1^.prezime_ime; t^.fakultet:=t1^.fakultet; t^.bodovi:=t1^.bodovi; t1^.redni_broj:=t2^.redni_broj; t1^.prezime_ime:=t2^.prezime_ime; t1^.fakultet:=t2^.fakultet; t1^.bodovi:=t2^.bodovi; t2^.redni_broj:=t^.redni_broj; t2^.prezime_ime:=t^.prezime_ime; t2^.fakultet:=t^.fakultet; t2^.bodovi:=t^.bodovi; dispose(t); end; t2:=t2^.sljedeci; end; t1:=t1^.sljedeci; write('Za nastavak pritisnite ENTER..'); readln; end;** begin pocetni:=NIL; trenutni:=NIL; writeln('******************************************'); writeln('**********DOBRODOSLI U FAX-O-MAT**********'); writeln('******************************************'); repeat writeln('1 - Racunaj broj bodova'); writeln('2 - Dodaj ucenika'); writeln('3 - Brisi ucenika'); writeln('4 - Ispis liste'); writeln('5 - Izmjeni podatke'); writeln('6 - Sortiraj listu prema broju bodova'); writeln('0 - Kraj'); readln(i); case i of 1:racunaj; 2:unos; 3:brisi; 4:ispis; 5:izmjeni; 6:sortiraj; end; until i=0; end. Either it crashes with a fatal error, or when I press the number 6, nothing happens. The pointer keeps blinking and I can't enter any more numbers.

    Read the article

  • PSTN Trunk TDM400P Install on Asterisk / Trixbox

    - by Jona
    Hey All, I'm trying to get a TDM400P card with FXO module to connect to our PSTN line. The card is correctly detected by Linux: [trixbox1.localdomain asterisk]# lspci 00:09.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface I've run setup-pstn which produces the following output trixbox1.localdomain ~]# setup-pstn -------------------------------------------------------------- Detecting PSTN cards and USB PSTN Devices -------------------------------------------------------------- Hardware present! STOPPING ASTERISK Asterisk Stopped STOPPING FOP SERVER FOP Server Stopped Unloading DAHDI hardware modules: done Loading DAHDI hardware modules: wct4xxp: [ OK ] wcte12xp: [ OK ] wct1xxp: [ OK ] wcte11xp: [ OK ] wctdm24xxp: [ OK ] opvxa1200: [ OK ] wcfxo: [ OK ] wctdm: [ OK ] wcb4xxp: [ OK ] wctc4xxp: [ OK ] xpp_usb: [ OK ] Running dahdi_cfg: [ OK ] SETTING FILE PERMISSIONS Permissions OK STARTING ASTERISK Asterisk Started STARTING FOP SERVER FOP Server Started Chan Extension Context Language MOH Interpret Blocked State pseudo default en default In Service 1 from-pstn en default In Service dahdi_scan returns: dahdi_scan [1] active=yes alarms=OK description=Wildcard TDM400P REV I Board 5 name=WCTDM/4 manufacturer=Digium devicetype=Wildcard TDM400P REV I location=PCI Bus 00 Slot 10 basechan=1 totchans=4 irq=209 type=analog port=1,FXO port=2,none port=3,none port=4,none And asterisk can see the channel: > trixbox1*CLI> dahdi show channel 1 > Channel: 1LI> File Descriptor: 14 > Span: 11*CLI> Extension: I> Dialing: > noI> Context: from-pstn Caller ID: I> > Calling TON: 0 Caller ID name: > Mailbox: none Destroy: 0LI> InAlarm: > 1LI> Signalling Type: FXS Kewlstart > Radio: 0*CLI> Owner: <None> Real: > <None>> Callwait: <None> Threeway: > <None> Confno: -1LI> Propagated > Conference: -1 Real in conference: 0 > DSP: no1*CLI> Busy Detection: no TDD: > no1*CLI> Relax DTMF: no > Dialing/CallwaitCAS: 0/0 Default law: > ulaw Fax Handled: no Pulse phone: no > DND: no1*CLI> Echo Cancellation: > trixbox1128 taps trixbox1(unless TDM > bridged) currently OFF Actual > Confinfo: Num/0, Mode/0x0000 Actual > Confmute: No > Hookstate (FXS only): Onhook A cat of /etc/asterisk/dahdi.conf shows: [trixbox1.localdomain ~]# cat /etc/asterisk/dahdi-channels.conf ; Autogenerated by /usr/sbin/dahdi_genconf on Tue May 25 17:45:13 2010 ; If you edit this file and execute /usr/sbin/dahdi_genconf again, ; your manual changes will be LOST. ; Dahdi Channels Configurations (chan_dahdi.conf) ; ; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended ; to be #include-d by /etc/chan_dahdi.conf that will include the global settings ; ; Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER) ;;; line="1 WCTDM/4/0 FXSKS (SWEC: MG2)" signalling=fxs_ks callerid=asreceived group=0 context=from-pstn channel => 1 callerid= group= context=default I have configured a "ZAP Trunk (DAHDI compatibility Mode)" with the ZAP identifier 1 and an outbound route, but when ever I try to make an external call via it I get the "All Circuits are busy now, please try your call again later message". I have one outbound route which uses the dial pattern 9|. and the Trunk Zap/1 and one Zap Trunk which uses Zap Identifier (trunk name): 1 and has no Dial Rules. The FXO module is directly connected to our phone line from BT via a BT-RJ11 cable. When running tail -f /var/log/asterisk/full and placing a call I get the following output: [May 26 11:10:52] VERBOSE[2723] logger.c: == Using SIP RTP TOS bits 184 [May 26 11:10:52] VERBOSE[2723] logger.c: == Using SIP RTP CoS mark 5 [May 26 11:10:52] VERBOSE[2723] logger.c: == Using SIP VRTP TOS bits 136 [May 26 11:10:52] VERBOSE[2723] logger.c: == Using SIP VRTP CoS mark 6 [May 26 11:10:52] WARNING[2661] pbx.c: FONALITY: This thread has already held the conlock, skip locking [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [901483890915@from-internal:1] Macro("SIP/801-b7ce8c28", "user-callerid,SKIPTTL,") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:1] Set("SIP/801-b7ce8c28", "AMPUSER=801") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:2] GotoIf("SIP/801-b7ce8c28", "0?report") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:3] ExecIf("SIP/801-b7ce8c28", "1?Set(REALCALLERIDNUM=801)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:4] Set("SIP/801-b7ce8c28", "AMPUSER=801") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:5] Set("SIP/801-b7ce8c28", "AMPUSERCIDNAME=Jona") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:6] GotoIf("SIP/801-b7ce8c28", "0?report") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:7] Set("SIP/801-b7ce8c28", "AMPUSERCID=801") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:8] Set("SIP/801-b7ce8c28", "CALLERID(all)="Jona" <801>") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:9] Set("SIP/801-b7ce8c28", "REALCALLERIDNUM=801") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:10] ExecIf("SIP/801-b7ce8c28", "0?Set(CHANNEL(language)=)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:11] GotoIf("SIP/801-b7ce8c28", "1?continue") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-user-callerid,s,20) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-user-callerid:20] NoOp("SIP/801-b7ce8c28", "Using CallerID "Jona" <801>") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [901483890915@from-internal:2] Set("SIP/801-b7ce8c28", "_NODEST=") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [901483890915@from-internal:3] Macro("SIP/801-b7ce8c28", "record-enable,801,OUT,") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-record-enable:1] GotoIf("SIP/801-b7ce8c28", "1?check") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-record-enable,s,4) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-record-enable:4] AGI("SIP/801-b7ce8c28", "recordingcheck,20100526-111052,1274868652.1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck [May 26 11:10:52] VERBOSE[2858] logger.c: recordingcheck,20100526-111052,1274868652.1: Outbound recording not enabled [May 26 11:10:52] VERBOSE[2858] logger.c: -- <SIP/801-b7ce8c28>AGI Script recordingcheck completed, returning 0 [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-record-enable:5] MacroExit("SIP/801-b7ce8c28", "") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [901483890915@from-internal:4] Macro("SIP/801-b7ce8c28", "dialout-trunk,1,01483890915,") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:1] Set("SIP/801-b7ce8c28", "DIAL_TRUNK=1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/801-b7ce8c28", "0?sub-pincheck,s,1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/801-b7ce8c28", "0?disabletrunk,1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:4] Set("SIP/801-b7ce8c28", "DIAL_NUMBER=01483890915") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:5] Set("SIP/801-b7ce8c28", "DIAL_TRUNK_OPTIONS=tr") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:6] Set("SIP/801-b7ce8c28", "OUTBOUND_GROUP=OUT_1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/801-b7ce8c28", "1?nomax") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-dialout-trunk,s,9) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/801-b7ce8c28", "0?skipoutcid") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:10] Set("SIP/801-b7ce8c28", "DIAL_TRUNK_OPTIONS=") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:11] Macro("SIP/801-b7ce8c28", "outbound-callerid,1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERPRES()=)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/801-b7ce8c28", "0?Set(REALCALLERIDNUM=801)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/801-b7ce8c28", "1?normcid") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-outbound-callerid,s,6) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:6] Set("SIP/801-b7ce8c28", "USEROUTCID=") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:7] Set("SIP/801-b7ce8c28", "EMERGENCYCID=") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:8] Set("SIP/801-b7ce8c28", "TRUNKOUTCID=") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/801-b7ce8c28", "1?trunkcid") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-outbound-callerid,s,12) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERID(all)=)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERID(all)=)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/801-b7ce8c28", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/801-b7ce8c28", "0?AGI(fixlocalprefix)") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:13] Set("SIP/801-b7ce8c28", "OUTNUM=01483890915") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:14] Set("SIP/801-b7ce8c28", "custom=DAHDI/1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/801-b7ce8c28", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:16] Macro("SIP/801-b7ce8c28", "dialout-trunk-predial-hook,") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/801-b7ce8c28", "") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/801-b7ce8c28", "0?bypass,1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/801-b7ce8c28", "0?customtrunk") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:19] Dial("SIP/801-b7ce8c28", "DAHDI/1/01483890915,300,") in new stack [May 26 11:10:52] WARNING[2858] app_dial.c: Unable to create channel of type 'DAHDI' (cause 0 - Unknown) [May 26 11:10:52] VERBOSE[2858] logger.c: == Everyone is busy/congested at this time (1:0/0/1) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-dialout-trunk:20] Goto("SIP/801-b7ce8c28", "s-CHANUNAVAIL,1") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf("SIP/801-b7ce8c28", "1?noreport") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3) [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:3] NoOp("SIP/801-b7ce8c28", "TRUNK Dial failed due to CHANUNAVAIL (hangupcause: 0) - failing through to other trunks") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [901483890915@from-internal:5] Macro("SIP/801-b7ce8c28", "outisbusy,") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- Executing [s@macro-outisbusy:1] Playback("SIP/801-b7ce8c28", "all-circuits-busy-now,noanswer") in new stack [May 26 11:10:52] VERBOSE[2858] logger.c: -- <SIP/801-b7ce8c28> Playing 'all-circuits-busy-now.ulaw' (language 'en') [May 26 11:10:54] VERBOSE[2858] logger.c: -- Executing [s@macro-outisbusy:2] Playback("SIP/801-b7ce8c28", "pls-try-call-later,noanswer") in new stack [May 26 11:10:54] VERBOSE[2858] logger.c: -- <SIP/801-b7ce8c28> Playing 'pls-try-call-later.ulaw' (language 'en') [May 26 11:10:54] WARNING[2661] pbx.c: FONALITY: This thread has already held the conlock, skip locking [May 26 11:10:54] VERBOSE[2858] logger.c: == Spawn extension (macro-outisbusy, s, 2) exited non-zero on 'SIP/801-b7ce8c28' in macro 'outisbusy' [May 26 11:10:54] VERBOSE[2858] logger.c: == Spawn extension (from-internal, 901483890915, 5) exited non-zero on 'SIP/801-b7ce8c28' [May 26 11:10:54] VERBOSE[2858] logger.c: -- Executing [h@from-internal:1] Macro("SIP/801-b7ce8c28", "hangupcall") in new stack [May 26 11:10:54] VERBOSE[2858] logger.c: -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/801-b7ce8c28", "vw") in new stack [May 26 11:10:54] VERBOSE[2858] logger.c: -- Executing [s@macro-hangupcall:2] NoCDR("SIP/801-b7ce8c28", "") in new stack [May 26 11:10:54] VERBOSE[2858] logger.c: -- Executing [s@macro-hangupcall:3] GotoIf("SIP/801-b7ce8c28", "1?skiprg") in new stack [May 26 11:10:54] VERBOSE[2858] logger.c: -- Goto (macro-hangupcall,s,6) [May 26 11:10:55] VERBOSE[2858] logger.c: -- Executing [s@macro-hangupcall:6] GotoIf("SIP/801-b7ce8c28", "1?skipblkvm") in new stack [May 26 11:10:55] VERBOSE[2858] logger.c: -- Goto (macro-hangupcall,s,9) [May 26 11:10:55] VERBOSE[2858] logger.c: -- Executing [s@macro-hangupcall:9] GotoIf("SIP/801-b7ce8c28", "1?theend") in new stack [May 26 11:10:55] VERBOSE[2858] logger.c: -- Goto (macro-hangupcall,s,11) [May 26 11:10:55] VERBOSE[2858] logger.c: -- Executing [s@macro-hangupcall:11] Hangup("SIP/801-b7ce8c28", "") in new stack [May 26 11:10:55] VERBOSE[2858] logger.c: == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/801-b7ce8c28' in macro 'hangupcall' [May 26 11:10:55] VERBOSE[2858] logger.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/801-b7ce8c28' I'm guessing I've missed a configuration step somewhere but no idea where, any help greatly appreciated.

    Read the article

  • Inheritance issue

    - by VenkateshGudipati
    hi Friends i am facing a issue in Inheritance i have a interface called Irewhizz interface irewhzz { void object save(object obj); void object getdata(object obj); } i write definition in different class like public user:irewhzz { public object save(object obj); { ....... } public object getdata(object obj); { ....... } } this is antoher class public client:irewhzz { public object save(object obj); { ....... } public object getdata(object obj); { ....... } } now i have different classes like public partial class RwUser { #region variables IRewhizzDataHelper irewhizz; IRewhizzRelationDataHelper irewhizzrelation; private string _firstName; private string _lastName; private string _middleName; private string _email; private string _website; private int _addressId; private string _city; private string _zipcode; private string _phone; private string _fax; //private string _location; private string _aboutMe; private string _username; private string _password; private string _securityQuestion; private string _securityQAnswer; private Guid _user_Id; private long _rwuserid; private byte[] _image; private bool _changepassword; private string _mobilephone; private int _role; #endregion //IRewhizz is the interface and its functions are implimented by UserDataHelper class //RwUser Class is inheriting the UserDataHelper Properties and functions. //Here UserDataHelper functions are called with Irewhizz Interface Object but not with the //UserDataHelper class Object It will resolves the unit testing conflict. #region Constructors public RwUser() : this(new UserDataHelper(), new RewhizzRelationalDataHelper()) { } public RwUser(IRewhizzDataHelper repositary, IRewhizzRelationDataHelper relationrepositary) { irewhizz = repositary; irewhizzrelation = relationrepositary; } #endregion #region Properties public int Role { get { return _role; } set { _role = value; } } public string MobilePhone { get { return _mobilephone; } set { _mobilephone = value; } } public bool ChangePassword { get { return _changepassword; } set { _changepassword = value; } } public byte[] Image { get { return _image; } set { _image = value; } } public string FirstName { get { return _firstName; } set { _firstName = value; } } public string LastName { get { return _lastName; } set { _lastName = value; } } public string MiddleName { get { return _middleName; } set { _middleName = value; } } public string Email { get { return _email; } set { _email = value; } } public string Website { get { return _website; } set { _website = value; } } public int AddressId { get { return _addressId; } set { _addressId = value; } } public string City { get { return _city; } set { _city = value; } } public string Zipcode { get { return _zipcode; } set { _zipcode = value; } } public string Phone { get { return _phone; } set { _phone = value; } } public string Fax { get { return _fax; } set { _fax = value; } } //public string Location //{ // get // { // return _location; // } // set // { // _location = value; // } //} public string AboutMe { get { return _aboutMe; } set { _aboutMe = value; } } public string username { get { return _username; } set { _username = value; } } public string password { get { return _password; } set { _password = value; } } public string SecurityQuestion { get { return _securityQuestion; } set { _securityQuestion = value; } } public string SecurityQAnswer { get { return _securityQAnswer; } set { _securityQAnswer = value; } } public Guid UserID { get { return _user_Id; } set { _user_Id = value; } } public long RwUserID { get { return _rwuserid; } set { _rwuserid = value; } } #endregion #region MemberFunctions // DataHelperDataContext db = new DataHelperDataContext(); // RewhizzDataHelper rwdh=new RewhizzDataHelper(); //It saves user information entered by user and returns the id of that user public object saveUserInfo(RwUser userObj) { userObj.UserID = irewhizzrelation.GetUserId(username); var res = irewhizz.saveData(userObj); return res; } //It returns the security questions for user registration } public class Agent : RwUser { IRewhizzDataHelper irewhizz; IRewhizzRelationDataHelper irewhizzrelation; private int _roleid; private int _speclisationid; private int[] _language; private string _brokaragecompany; private int _loctionType_lk; private string _rolename; private int[] _specialization; private string _agentID; private string _expDate; private string _regstates; private string _selLangs; private string _selSpels; private string _locations; public string Locations { get { return _locations; } set { _locations = value; } } public string SelectedLanguages { get { return _selLangs; } set { _selLangs = value; } } public string SelectedSpecialization { get { return _selSpels; } set { _selSpels = value; } } public string RegisteredStates { get { return _regstates; } set { _regstates = value; } } //private string _registeredStates; public string AgentID { get { return _agentID; } set { _agentID = value; } } public string ExpDate { get { return _expDate; } set { _expDate = value; } } private int[] _registeredStates; public SelectList RegisterStates { set; get; } public SelectList Languages { set; get; } public SelectList Specializations { set; get; } public int[] RegisterdStates { get { return _registeredStates; } set { _registeredStates = value; } } //public string RegisterdStates //{ // get // { // return _registeredStates; // } // set // { // _registeredStates = value; // } //} public int RoleId { get { return _roleid; } set { _roleid = value; } } public int SpeclisationId { get { return _speclisationid; } set { _speclisationid = value; } } public int[] Language { get { return _language; } set { _language = value; } } public int LocationTypeId { get { return _loctionType_lk; } set { _loctionType_lk = value; } } public string BrokarageCompany { get { return _brokaragecompany; } set { _brokaragecompany = value; } } public string Rolename { get { return _rolename; } set { _rolename = value; } } public int[] Specialization { get { return _specialization; } set { _specialization = value; } } public Agent() : this(new AgentDataHelper(), new RewhizzRelationalDataHelper()) { } public Agent(IRewhizzDataHelper repositary, IRewhizzRelationDataHelper relationrepositary) { irewhizz = repositary; irewhizzrelation = relationrepositary; } public void inviteclient() { //Code related to mailing } //DataHelperDataContext dataObj = new DataHelperDataContext(); //#region IRewhizzFactory Members //public List<object> getAgentInfo(string username) //{ // var res=dataObj.GetCompleteUserDetails(username); // return res.ToList(); // throw new NotImplementedException(); //} //public List<object> GetRegisterAgentData(string username) //{ // var res= dataObj.RegisteredUserdetails(username); // return res.ToList(); //} //public void saveAgentInfo(string username, string password, string firstname, string lastname, string middlename, string securityquestion, string securityQanswer) //{ // User userobj=new User(); // var result = dataObj.rw_Users_InsertUserInfo(firstname, middlename, lastname, dataObj.GetUserId(username), securityquestion, securityquestionanswer); // throw new NotImplementedException(); //} //#endregion public Agent updateData(Agent objectId) { objectId.UserID = irewhizzrelation.GetUserId(objectId.username); objectId = (Agent)irewhizz.updateData(objectId); return objectId; } public Agent GetAgentData(Agent agentodj) { agentodj.UserID = irewhizzrelation.GetUserId(agentodj.username); agentodj = (Agent)irewhizz.getData(agentodj); if (agentodj.RoleId != 0) agentodj.Rolename = (string)(string)irewhizzrelation.getValue(agentodj.RoleId); if (agentodj.RegisterdStates.Count() != 0) { List<SelectListItem> list = new List<SelectListItem>(); string regstates = ""; foreach (int i in agentodj.RegisterdStates) { SelectListItem listitem = new SelectListItem(); listitem.Value = i.ToString(); listitem.Text = (string)irewhizzrelation.getValue(i); list.Add(listitem); regstates += (string)irewhizzrelation.getValue(i) + ","; } SelectList selectlist = new SelectList(list, "Value", "Text"); agentodj.RegisterStates = selectlist; if(regstates!=null) agentodj.RegisteredStates = regstates.Remove(regstates.Length - 1); } if (agentodj.Language.Count() != 0) { List<SelectListItem> list = new List<SelectListItem>(); string selectedlang = ""; foreach (int i in agentodj.Language) { SelectListItem listitem = new SelectListItem(); listitem.Value = i.ToString(); listitem.Text = (string)irewhizzrelation.getValue(i); list.Add(listitem); selectedlang += (string)irewhizzrelation.getValue(i) + ","; } SelectList selectlist = new SelectList(list, "Value", "Text"); agentodj.Languages = selectlist; // agentodj.SelectedLanguages = selectedlang; } if (agentodj.Specialization.Count() != 0) { List<SelectListItem> list = new List<SelectListItem>(); string selectedspel = ""; foreach (int i in agentodj.Specialization) { SelectListItem listitem = new SelectListItem(); listitem.Value = i.ToString(); listitem.Text = (string)irewhizzrelation.getValue(i); list.Add(listitem); selectedspel += (string)irewhizzrelation.getValue(i) + ","; } SelectList selectlist = new SelectList(list, "Value", "Text"); agentodj.Specializations = selectlist; //agentodj.SelectedSpecialization = selectedspel; } return agentodj; } public void SaveImage(byte[] pic, String username) { irewhizzrelation.SaveImage(pic, username); } } now the issue is when ever i am calling agent class it is given error like null reference exception for rwuser class can any body give the solution thanks in advance

    Read the article

  • insert/update/delete with xml in .net 3.5

    - by Radhi
    Hello guys, i have "UserProfile" in my site which we have stored in xml fromat of xml is as below <UserProfile xmlns=""> <BasicInfo> <Title value="Basic Details" /> <Fields> <UserId title="UserId" display="No" right="Public" value="12" /> <EmailAddress title="Email Address" display="Yes" right="Public" value="[email protected]" /> <FirstName title="First Name" display="Yes" right="Public" value="Radhi" /> <LastName title="Last Name" display="Yes" right="Public" value="Patel" /> <DisplayName title="Display Name" display="Yes" right="Public" value="Radhi Patel" /> <RegistrationStatusId title="RegistrationStatusId" display="No" right="Public" value="10" /> <RegistrationStatus title="Registration Status" display="Yes" right="Private" value="Registered" /> <CountryName title="Country" display="Yes" right="Public" value="India" /> <StateName title="State" display="Yes" right="Public" value="Maharashtra" /> <CityName title="City" display="Yes" right="Public" value="Mumbai" /> <Gender title="Gender" display="Yes" right="Public" value="FeMale" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="0" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="Nov 27 2009 3:08PM " /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="12" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value="Feb 18 2010 1:43PM " /> <LogInStatusId title="LogInStatusId" display="No" right="Public" value="1" /> <LogInStatus title="LogIn Status" display="Yes" right="Private" value="Free" /> <ProfileImagePath title="Profile Pic" display="No" right="Public" value="~/Images/96.jpg" /> </Fields> </BasicInfo> <PersonalInfo> <Title value="Personal Details" /> <Fields> <Nickname title="Nick Name" display="Yes" right="Public" value="Rahul" /> <NativeLocation title="Native" display="Yes" right="Public" value="Amreli" /> <DateofAnniversary title="Anniversary Dt." display="Yes" right="Public" value="12/29/2008" /> <BloodGroupId title="BloodGroupId" display="No" right="Public" value="25" /> <BloodGroupName title="Blood Group" display="Yes" right="Public" value="25" /> <MaritalStatusId title="MaritalStatusId" display="No" right="Public" value="34" /> <MaritalStatusName title="Marital status" display="Yes" right="Private" value="34" /> <DateofDeath title="Death dt" display="Yes" right="Private" value="" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="12" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="Jan 6 2010 2:59PM " /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="12" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value="3/10/2010 5:34:14 PM" /> </Fields> </PersonalInfo> <FamilyInfo> <Title value="Family Details" /> <Fields> <GallantryHistory title="Gallantry History" display="Yes" right="Public" value="Gallantry history rahul" /> <Ethinicity title="Ethinicity" display="Yes" right="Public" value="ethnicity rahul" /> <KulDev title="KulDev" display="Yes" right="Public" value="Krishna" /> <KulDevi title="KulDevi" display="Yes" right="Public" value="Khodiyar" /> <Caste title="Caste" display="Yes" right="Private" value="Brhamin" /> <SunSignId title="SunSignId" display="No" right="Public" value="20" /> <SunSignName title="SunSignName" display="Yes" right="Public" value="Scorpio" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="12" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="Dec 29 2009 4:59PM " /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="12" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value="3/10/2010 6:29:56 PM" /> </Fields> </FamilyInfo> <HobbyInfo> <Title value="Hobbies/Interests" /> <Fields> <AbountMe title="Abount Me" display="Yes" right="Public" value="Naughty.... " /> <Hobbies title="Hobbies" display="Yes" right="Public" value="Dance, Music, decoration, Shopping" /> <Food title="Food" display="Yes" right="Public" value="Maxican salsa, Pizza, Khoya kaju " /> <Movies title="Movies" display="Yes" right="Public" value="day after tommorrow. wake up sid. avatar" /> <Music title="Music" display="Yes" right="Public" value="Chu kar mere man ko... wake up sid songs, slow music, apgk songs" /> <TVShows title="TV Shows" display="Yes" right="Public" value="business bazzigar, hanah montana" /> <Books title="Books" display="Yes" right="Public" value="mystry novels" /> <Sports title="Sports" display="Yes" right="Public" value="Badminton" /> <Will title="Will" display="Yes" right="Public" value="do photography, to have my own super home... and i can decorate it like anything..." /> <FavouriteQuotes title="Favourite Quotes" display="Yes" right="Public" value="Live like a king nothing lasts forever. not even your troubles smooth sea do not makes skillfull sailors" /> <CremationPrefernces title="Cremation Prefernces" display="Yes" right="Public" value="" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="12" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="Feb 24 2010 2:13PM " /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="12" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value="Mar 2 2010 4:34PM " /> </Fields> </HobbyInfo> <PermenantAddr> <Title value="Permenant Address" /> <Fields> <Address title="Address" display="Yes" right="Public" value="Test Entry" /> <CityId title="CityId" display="No" right="Public" value="93" /> <CityName title="City" display="Yes" right="Public" value="Chennai" /> <StateId title="StateId" display="No" right="Public" value="89" /> <StateName title="State" display="Yes" right="Public" value="Tamil Nadu" /> <CountryId title="CountryId" display="No" right="Public" value="108" /> <CountryName title="Country" display="Yes" right="Public" value="India" /> <ZipCode title="ZipCode" display="Yes" right="Private" value="360019" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="12" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="Jan 6 2010 1:29PM " /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="0" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value=" " /> </Fields> </PermenantAddr> <PresentAddr> <Title value="Present Address" /> <Fields> <Address title="Ethinicity" display="Yes" right="Public" value="" /> <CityId title="CityId" display="No" right="Public" value="" /> <CityName title="City" display="Yes" right="Public" value="" /> <StateId title="StateId" display="No" right="Public" value="" /> <StateName title="State" display="Yes" right="Public" value="" /> <CountryId title="CountryId" display="No" right="Public" value="" /> <CountryName title="Country" display="Yes" right="Public" value="" /> <ZipCode title="ZipCode" display="Yes" right="Public" value="" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="" /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value="" /> </Fields> </PresentAddr> <ContactInfo> <Title value="Contact Details" /> <Fields> <DayPhoneNo title="Day Phone" display="Yes" right="Public" value="" /> <NightPhoneNo title="Night Phone" display="Yes" right="Public" value="" /> <MobileNo title="Mobile No" display="Yes" right="Private" value="" /> <FaxNo title="Fax No" display="Yes" right="CUG" value="" /> <CreatedBy title="CreatedBy" display="No" right="Public" value="12" /> <CreatedOn title="CreatedOn" display="No" right="Public" value="Jan 5 2010 12:37PM " /> <ModifiedBy title="ModifiedBy" display="No" right="Public" value="12" /> <ModifiedOn title="ModifiedOn" display="No" right="Public" value="Feb 17 2010 1:37PM " /> </Fields> </ContactInfo> <EmailInfo> <Title value="Alternate Email Addresses" /> <Fields /> </EmailInfo> <AcademicInfo> <Title value="Education Details" /> <Fields> <Record right="Public"> <Education title="Education" display="Yes" value="Full Attendance" /> <Institute title="Institute" display="Yes" value="Attendance" /> <PassingYear title="Passing Year" display="Yes" value="2000" /> <IsActive title="IsActive" display="No" value="false" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 12:41PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 12:41PM " /> </Record> <Record right="Public"> <Education title="Education" display="Yes" value="D.C.E." /> <Institute title="Institute" display="Yes" value="G.P.G" /> <PassingYear title="Passing Year" display="Yes" value="2005" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 12:45PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 12:45PM " /> </Record> <Record right="Public"> <Education title="Education" display="Yes" value="MCSE" /> <Institute title="Institute" display="Yes" value="MCSE" /> <PassingYear title="Passing Year" display="Yes" value="2009" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 6:12PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Mar 2 2010 4:33PM " /> </Record> <Record right="Public"> <Education title="Education" display="Yes" value="H.S.C." /> <Institute title="Institute" display="Yes" value="G.H.S.E.B." /> <PassingYear title="Passing Year" display="Yes" value="2002" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 6:17PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 6:17PM " /> </Record> <Record right="Public"> <Education title="Education" display="Yes" value="S.S.C." /> <Institute title="Institute" display="Yes" value="G.S.E.B." /> <PassingYear title="Passing Year" display="Yes" value="2000" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 6:17PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 6:17PM " /> </Record> </Fields> </AcademicInfo> <AchievementInfo> <Title value="Achievement Details" /> <Fields> <Record right="Public"> <Awards title="Award" display="Yes" value="Test Entry" /> <FieldOfAward title="Field Of Award" display="Yes" value="Test Entry" /> <Tournament title="Tournament" display="Yes" value="Test Entry" /> <AwardDescription title="Description" display="Yes" value="Test Entry" /> <AwardYear title="Award Year" display="Yes" value="2002" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 3:51PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 3:51PM " /> </Record> <Record right="Public"> <Awards title="Award" display="Yes" value="Test Entry" /> <FieldOfAward title="Field Of Award" display="Yes" value="Test Entry" /> <Tournament title="Tournament" display="Yes" value="Test Entry" /> <AwardDescription title="Description" display="Yes" value="Test Entry" /> <AwardYear title="Award Year" display="Yes" value="2005" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Jan 8 2010 10:19AM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Jan 8 2010 10:19AM " /> </Record> <Record right="Public"> <Awards title="Award" display="Yes" value="Test Entry3" /> <FieldOfAward title="Field Of Award" display="Yes" value="Test Entry3" /> <Tournament title="Tournament" display="Yes" value="Test Entry3" /> <AwardDescription title="Description" display="Yes" value="Test Entry3" /> <AwardYear title="Award Year" display="Yes" value="2007" /> <IsActive title="IsActive" display="No" value="true" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 11:47AM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 11:47AM " /> </Record> <Record right="Public"> <Awards title="Award" display="Yes" value="Test Entry4" /> <FieldOfAward title="Field Of Award" display="Yes" value="Test Entry4" /> <Tournament title="Tournament" display="Yes" value="Test Entry4" /> <AwardDescription title="Description" display="Yes" value="Test Entry3" /> <AwardYear title="Award Year" display="Yes" value="2000" /> <IsActive title="IsActive" display="No" value="false" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Dec 31 2009 11:47AM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Dec 31 2009 11:47AM " /> </Record> </Fields> </AchievementInfo> <ProfessionalInfo> <Title value="Professional Details" /> <Fields> <Record right="Public"> <Occupation title="Occupation" display="Yes" value="Test Entry" /> <Organization title="Organization" display="Yes" value="Test Entry" /> <ProjectsDescription title="Description" display="Yes" value="Test Entry" /> <Duration title="Duration" display="Yes" value="26" /> <IsActive title="IsActive" display="No" value="false" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Jan 4 2010 3:01PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Jan 4 2010 3:01PM " /> </Record> <Record right="Public"> <Occupation title="Occupation" display="Yes" value="Test Entry" /> <Organization title="Organization" display="Yes" value="Test Entry" /> <ProjectsDescription title="Description" display="Yes" value="Test Entry" /> <Duration title="Duration" display="Yes" value="10" /> <IsActive title="IsActive" display="No" value="false" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Jan 4 2010 3:01PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Jan 4 2010 3:01PM " /> </Record> <Record right="Public"> <Occupation title="Occupation" display="Yes" value="Test Entry" /> <Organization title="Organization" display="Yes" value="Test Entry" /> <ProjectsDescription title="Description" display="Yes" value="Test Entry" /> <Duration title="Duration" display="Yes" value="15" /> <IsActive title="IsActive" display="No" value="false" /> <CreatedBy title="CreatedBy" display="No" value="12" /> <CreatedOn title="CreatedOn" display="No" value="Jan 4 2010 3:01PM " /> <ModifiedBy title="ModifiedBy" display="No" value="12" /> <ModifiedOn title="ModifiedOn" display="No" value="Jan 4 2010 3:01PM " /> </Record> </Fields> </ProfessionalInfo> </UserProfile> now for tags like PersonalInfo,contactInfo,Address there will be only one record, but for tags like "OtherInfo","academicInfo","ProfessionalInfo" there will be multiple records so in xml there are tags for that. now to edit tags having one record only for one user i did coding like: private void FillFamilyInfoControls(XElement rootElement) { ddlSunsign.DataBind(); XElement parentElement; string xPathQuery = "FamilyInfo/Fields"; parentElement = rootElement.XPathSelectElement(xPathQuery); txtGallantryHistory.Text = parentElement.Element("GallantryHistory").Attribute("value").Value; txtEthinicity.Text = parentElement.Element("Ethinicity").Attribute("value").Value; txtKulDev.Text = parentElement.Element("KulDev").Attribute("value").Value; txtKulDevi.Text = parentElement.Element("KulDevi").Attribute("value").Value; txtCaste.Text = parentElement.Element("Caste").Attribute("value").Value; ddlSunsign.SelectedValue = parentElement.Element("SunSignId").Attribute("value").Value; ddlSunsign.SelectedItem.Text = parentElement.Element("SunSignName").Attribute("value").Value; } private XElement UpdateFamilyInfoXML(XElement rootElement) { XElement parentElement; string xPathQuery = "FamilyInfo/Fields"; parentElement = rootElement.XPathSelectElement(xPathQuery); parentElement.Element("GallantryHistory").Attribute("value").Value = txtGallantryHistory.Text; parentElement.Element("Ethinicity").Attribute("value").Value = txtEthinicity.Text; parentElement.Element("KulDev").Attribute("value").Value = txtKulDev.Text; parentElement.Element("KulDevi").Attribute("value").Value = txtKulDevi.Text; parentElement.Element("Caste").Attribute("value").Value = txtCaste.Text; parentElement.Element("SunSignId").Attribute("value").Value = ddlSunsign.SelectedItem.Value; parentElement.Element("SunSignName").Attribute("value").Value = ddlSunsign.SelectedItem.Text; parentElement.Element("ModifiedBy").Attribute("value").Value = UMSession.CurrentLoggedInUser.UserId.ToString(); parentElement.Element("ModifiedOn").Attribute("value").Value = System.DateTime.Now.ToString(); return rootElement; //rootElement.XPathSelectElement(xPathQuery) = parentElement; } these 2 functions i have used to update xml and to get data from xml and fill into controls. but for the tags where there are multiple records... i am not able to find any solution /control using which i an do it easily. coz my field's value is in attribute named "Value" when in the examples i saw its between opening and closing tag.. i have 2 methods to do so. 1 . i make one page to edit a single record and pass id of record to that page on editing. open the page in iframe on same page to edit and in page_load get data from database for id passed and fill it in control. 2 . i store xml on server as physical file and use it in page i opened in iframe to edit the record. so i am confused... can anybody please guide me that what shpould i do to let user provide interface to edit this xml data/user profile ?

    Read the article

  • how to do gedcom import with minimal database roundtrip. what is best practice for this kind of dev

    - by Radhi
    In My current application, I need to import users from gedcom file. these users may exist in my registered users or i need to create one registered user for the same. now gedcom file contain s many information e.g. PersonalDetails,Addresses, Education Details, ProfessionalDetails this is one sample of xml file we are storing to store user's profile. <UserProfile xmlns=""> <BasicInfo> <Title value="Basic Details" /> <Fields> <UserId title="UserId" right="Public" value="151" /> <EmailAddress title="Email Address" right="CUG" value="[email protected]" /> <FirstName title="First Name" right="Public" value="Anju" /> <LastName title="Last Name" right="Public" value="Trivedi" /> <DisplayName title="Display Name" right="Private" value="Anju" /> <RegistrationStatusId title="RegistrationStatusId" right="Public" value="10" /> <RegistrationStatus title="Registration Status" right="Private" value="Registered" /> <CityId title="CityId" right="Private" value="19" /> <CityName title="City" right="Public" value="Delhi" /> <StateId title="StateId" right="Private" value="69" /> <StateName title="State" right="Public" value="Delhi" /> <CountryId title="CountryId" right="Private" value="109" /> <CountryName title="Country" right="Public" value="India" /> <Gender title="Gender" right="Private" value="Male" /> <CreatedBy title="CreatedBy" right="Public" value="0" /> <CreatedOn title="CreatedOn" right="Public" value="Nov 27 2009 3:08PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="13" /> <ModifiedOn title="ModifiedOn" right="Public" value="Mar 3 2010 6:56PM " /> <LogInStatusId title="LogInStatusId" right="Public" value="1" /> <LogInStatus title="LogIn Status" right="Private" value="Free" /> <ProfileImagePath title="Profile Pic" right="Public" value="~/Images/13_HolidayBarbie07CL2010427143129.jpg" /> <ProfileThumbnailPath title="Profile Thumbnail" right="Public" value="~/Images/Thumb13_HolidayBarbie07CL2010427143129.jpg" /> </Fields> </BasicInfo> <PersonalInfo> <Title value="Personal Details" /> <Fields> <Nickname title="Nick Name" right="Public" value="Anju" /> <NativeLocation title="Native" right="Public" value="Mehsana" /> <DateofAnniversary title="Anniversary Dt." right="Private" value="4/1/2010" /> <BloodGroupId title="BloodGroupId" right="Public" value="24" /> <BloodGroupName title="Blood Group" right="Public" value="A+" /> <MaritalStatusId title="MaritalStatusId" right="Private" value="35" /> <MaritalStatusName title="Marital status" right="Private" value="UnMarried" /> <DateofDeath title="Death dt" right="Private" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="13" /> <ModifiedOn title="ModifiedOn" right="Public" value="4/27/2010 2:32:07 PM" /> <DateOfBirth title="Birth Date" value="" right="CUG" /> <BirthPlace title="Birth Place" value="Jaipur" right="Private" /> </Fields> </PersonalInfo> <FamilyInfo> <Title value="Family Details" /> <Fields> <GallantryHistory title="Gallantry History" right="Public" value="Anjli History" /> <Ethinicity title="Ethinicity" right="Public" value="Indian" /> <KulDev title="KulDev" right="Public" value="Krishna" /> <KulDevi title="KulDevi" right="Public" value="Lakhsmi" /> <Caste title="Caste" right="Private" value="Vaishnav" /> <SunSignId title="SunSignId" right="Public" value="15" /> <SunSignName title="SunSignName" right="Public" value="Gemini" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Dec 11 2009 12:00AM " /> <ModifiedBy title="ModifiedBy" right="Public" value="13" /> <ModifiedOn title="ModifiedOn" right="Public" value="Dec 11 2009 12:00AM " /> </Fields> </FamilyInfo> <HobbyInfo> <Title value="Hobbies/Interests" /> <Fields> <AbountMe title="Abount Me" right="Public" value="" /> <Hobbies title="Hobbies" right="Public" value="" /> <Food title="Food" right="Public" value="" /> <Movies title="Movies" right="Public" value="" /> <Music title="Music" right="Public" value="" /> <TVShows title="TV Shows" right="Public" value="" /> <Books title="Books" right="Public" value="" /> <Sports title="Sports" right="Public" value="" /> <Will title="Will" right="Public" value="" /> <FavouriteQuotes title="Favourite Quotes" right="Public" value="" /> <CremationPrefernces title="Cremation Prefernces" right="Public" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="" /> <ModifiedOn title="ModifiedOn" right="Public" value="" /> </Fields> </HobbyInfo> <PermenantAddr> <Title value="Permenant Address" /> <Fields> <Address title="Address" right="Public" value="Select" /> <CityId title="CityId" right="Public" value="116" /> <CityName title="City" right="Public" value="Iran" /> <StateId title="StateId" right="Public" value="95" /> <StateName title="State" right="Public" value="Iran" /> <CountryId title="CountryId" right="Public" value="7" /> <CountryName title="Country" right="Public" value="Afghanistan" /> <ZipCode title="ZipCode" right="Private" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="13" /> <ModifiedOn title="ModifiedOn" right="Public" value="4/6/2010 10:48:39 AM" /> </Fields> </PermenantAddr> <PresentAddr> <Title value="Present Address" /> <Fields> <Address title="Address" right="Public" value="Select" /> <CityId title="CityId" right="Public" value="1" /> <CityName title="City" right="Public" value="Select" /> <StateId title="StateId" right="Public" value="1" /> <StateName title="State" right="Public" value="Select" /> <CountryId title="CountryId" right="Public" value="1" /> <CountryName title="Country" right="Public" value="Select" /> <ZipCode title="ZipCode" right="Private" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="" /> <ModifiedOn title="ModifiedOn" right="Public" value="" /> </Fields> </PresentAddr> <ContactInfo> <Title value="Contact Details" /> <Fields> <DayPhoneNo title="Day Phone" right="Public" value="" /> <NightPhoneNo title="Night Phone" right="Public" value="" /> <MobileNo title="Mobile No" right="Private" value="" /> <FaxNo title="Fax No" right="CUG" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="" /> <ModifiedOn title="ModifiedOn" right="Public" value="" /> </Fields> </ContactInfo> <EmailInfo> <Title value="Alternate Email Addresses" /> <Fields> <Record right="Public"> <Id title="Id" right="Public" value="3" /> <Provider title="Provider" right="Public" value="google" /> <EmailAddress title="Email Address" right="Public" value="[email protected]" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Mar 3 2010 10:17AM " /> <ModifiedBy title="ModifiedBy" right="Public" value="0" /> <ModifiedOn title="ModifiedOn" right="Public" value=" " /> </Record> <Record right="Public"> <Id title="Id" right="Public" value="4" /> <Provider title="Provider" right="Public" value="Yahoo" /> <EmailAddress title="Email Address" right="Public" value="[email protected]" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Mar 3 2010 6:53PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="0" /> <ModifiedOn title="ModifiedOn" right="Public" value=" " /> </Record> <Record right="Private"> <Provider value="111" right="Private" /> <EmailAddress value="[email protected]" right="Private" /> <Id value="5" /> <IsActive value="true" right="Private" /> <ModifiedBy value="13" right="Private" /> <ModifiedOn value="Tuesday, March 16, 2010" right="Private" /> </Record> </Fields> </EmailInfo> <AcademicInfo> <Title value="Education Details" /> <Fields> <Record right="Public"> <Id title="Id" right="Public" value="0" /> <Education title="Education" right="Public" value="" /> <Institute title="Institute" right="Public" value="" /> <PassingYear title="Passing Year" right="Public" value="" /> <IsActive title="IsActive" right="Public" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="" /> <ModifiedOn title="ModifiedOn" right="Public" value="" /> </Record> </Fields> </AcademicInfo> <AchievementInfo> <Title value="Achievement Details" /> <Fields> <Record right="Public"> <Id title="Id" right="Public" value="0" /> <Awards title="Award" right="Public" value="" /> <FieldOfAward title="Field Of Award" right="Public" value="" /> <Tournament title="Tournament" right="Public" value="" /> <AwardDescription title="Description" right="Public" value="" /> <AwardYear title="Award Year" right="Public" value="" /> <IsActive title="IsActive" right="Public" value="" /> <CreatedBy title="CreatedBy" right="Public" value="" /> <CreatedOn title="CreatedOn" right="Public" value="" /> <ModifiedBy title="ModifiedBy" right="Public" value="" /> <ModifiedOn title="ModifiedOn" right="Public" value="" /> </Record> </Fields> </AchievementInfo> <ProfessionalInfo> <Title value="Professional Details" /> <Fields> <Record right="Public"> <Id title="Id" right="Public" value="4" /> <Occupation title="Occupation" right="Public" value="a" /> <Organization title="Organization" right="Public" value="a" /> <ProjectsDescription title="Description" right="Public" value="a" /> <Duration title="Duration" right="Public" value="2" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Jan 7 2010 1:14PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="13" /> <ModifiedOn title="ModifiedOn" right="Public" value="Jan 7 2010 1:14PM " /> </Record> <Record right="Public"> <Id title="Id" right="Public" value="5" /> <Occupation title="Occupation" right="Public" value="ab" /> <Organization title="Organization" right="Public" value="zsd" /> <ProjectsDescription title="Description" right="Public" value="sd" /> <Duration title="Duration" right="Public" value="5" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Jan 7 2010 1:15PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="13" /> <ModifiedOn title="ModifiedOn" right="Public" value="Jan 7 2010 1:15PM " /> </Record> <Record right="Public"> <Id title="Id" right="Public" value="8" /> <Occupation title="Occupation" right="Public" value="fgdf" /> <Organization title="Organization" right="Public" value="gdfg" /> <ProjectsDescription title="Description" right="Public" value="dfgdf" /> <Duration title="Duration" right="Public" value="12" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Feb 22 2010 5:07PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="0" /> <ModifiedOn title="ModifiedOn" right="Public" value="Jan 1 1900 12:00AM " /> </Record> <Record right="Public"> <Id title="Id" right="Public" value="9" /> <Occupation title="Occupation" right="Public" value="fgdf" /> <Organization title="Organization" right="Public" value="gdfg" /> <ProjectsDescription title="Description" right="Public" value="dfgdf" /> <Duration title="Duration" right="Public" value="12" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Feb 22 2010 5:11PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="0" /> <ModifiedOn title="ModifiedOn" right="Public" value="Jan 1 1900 12:00AM " /> </Record> <Record right="Public"> <Id title="Id" right="Public" value="10" /> <Occupation title="Occupation" right="Public" value="fgdf" /> <Organization title="Organization" right="Public" value="gdfg" /> <ProjectsDescription title="Description" right="Public" value="dfgdf" /> <Duration title="Duration" right="Public" value="12" /> <IsActive title="IsActive" right="Public" value="false" /> <CreatedBy title="CreatedBy" right="Public" value="13" /> <CreatedOn title="CreatedOn" right="Public" value="Feb 22 2010 5:13PM " /> <ModifiedBy title="ModifiedBy" right="Public" value="0" /> <ModifiedOn title="ModifiedOn" right="Public" value="Jan 1 1900 12:00AM " /> </Record> </Fields> </ProfessionalInfo> <SecuritySettings> <AlbumRights> <Create value="Private" /> <View value="CUG" /> <Edit value="CUG" /> <Delete value="CUG" /> <PostComments value="CUG" /> <AddToAlbum value="CUG" /> </AlbumRights> <ImageRights> <Create value="Private" /> <View value="CUG" /> <Edit value="CUG" /> <Delete value="CUG" /> <PostComments value="Private" /> </ImageRights> </SecuritySettings> </UserProfile> now when i am importing data from gedcom, i am creating one person object which contains all this info. but before i insert it itodatabase have to check if userid exist for the emailaddress dont update data else create a user and update its profilexml from data fecthed from gedcom. for this i think i need some soln by which i can do only one roundtrip to database and can update all user's xml. or i can execute one sp to get userid from all users where i'll check if user exist then return userid else insert basic data and return inserted userid then for every user make xml from data and update it. please provide be suggestion what is best practice to do this kind of development. if need any more details please write me

    Read the article

  • PHP script keeps doing mmap/munmap

    - by Aurélien Momow
    Hello, My PHP script contains a loop, which does nothing much more than echoing and dereferencing pointers (like in $tab[$othertab[$i]]- stuff). It was working great until yesterday, when this script starting being VERY slow (like 50 times slower than before). After using strace, i figured out that 90% of the time, the script does mmap/munmap. Here is a random portion of the strace log : mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 munmap(0x7fac0156c000, 266240) = 0 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0156c000 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac0152b000 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fac014ea000 Here is the result of the strace -c command : % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 82.77 0.004092 0 13542 mmap 9.69 0.000479 0 3642 write 7.54 0.000373 0 13541 munmap 0.00 0.000000 0 100 read 0.00 0.000000 0 88 poll 0.00 0.000000 0 25 4 access ------ ----------- ----------- --------- --------- ---------------- 100.00 0.004944 30938 4 total Here is the php script : function affAnnonce($tabAnnonces, $isDoublon = 0) { GLOBAL $db, $base, $tabDomaine, $doublon, $traduction, $tab_contrat, $tab_emploi, $tab_categ, $tab_metier, $tab_region, $tab_departement, $tab_secteur, $tab_experience, $calc_all, $tabLangues, $tabLanguesNiveau, $tabNoAffAnnonce, $tabHisto; foreach($tabAnnonces AS $tmp) { if (in_array($tmp['id'], $tabNoAffAnnonce) === true) { continue; } $value->host = "../"; foreach($tabDomaine AS $domaine => $valeur) { if ($domaine == $tmp['domaine']) { $value->host = $valeur->host; break; } } // Ordre // secteur;metier;contrat;emploi;region;langues;domaine $tabPushModif = array(); if ($tmp['push_preview'] != '') { $tabPushModif = explode(';', $tmp['push_preview']); $tabPushModif['secteur'] = $tabPushModif[0]; $tabPushModif['metier'] = $tabPushModif[1]; $tabPushModif['contrat'] = $tabPushModif[2]; $tabPushModif['id_emploi'] = $tabPushModif[3]; $tabPushModif['regions'] = $tabPushModif[4]; $tabPushModif['langues'] = $tabPushModif[5]; $tabPushModif['domaine'] = $tabPushModif[6]; } $infoSoc = get_nom_societe($tmp['id_societe']); $number = ($tmp['nb_preview_push'] != '' ? $tmp['nb_preview_push'] : '&nbsp;'); $secteurs = explode ("/", $tmp[secteur]); $sector = ""; $count_sect = count($secteurs); for ($k = 0; $k < $count_sect; $k++) { if ($secteurs[$k] != '') { $sector .= $tab_secteur[$secteurs[$k]].'/'; } } $tmp['poste'] = apresinsertion($tmp['poste']); $tmp['metier'] = $tab_metier[$tmp['metier']]; $tmp['region'] = $tab_region[$tmp['region']]; $tmp['departement'] = $tab_departement[$tmp['departement']]; $tmp['secteur'] = $sector; $tmp['id_contrat'] = $tmp['contrat']; $tmp['contrat'] = $tab_contrat[$tmp['contrat']]; $tmp['emploi'] = $tab_emploi[$tmp['id_emploi']]; $tmp['categorie'] = $tab_categ[$tmp['categorie']]; echo '<tr id="'.($isDoublon ? 'dbl_' : '').$tmp['id'].'"><td align="center" class="tdFirst nowrap dbl_'.$tmp['id'].'" id="aff_'.$tmp['id'].'"'; switch($tmp['affiche']) { case '0': echo ' bgcolor=#DBB7FF'; break; default : ; } echo '><a href=?op=annonces&search4='.$tmp[id].' target=_new>'.$tmp[id].'</a><br />'; echo '<a href="'.$value->host.'" target="blank">'.strtoupper($tmp['domaine']).'<br /><img src="../images/flags/'.$tmp['domaine'].'.png" border=0 align=middle></a>'; echo '</TD><TD align=center class=tdNext'; if ($tmp['filtre'] == 1) echo ' bgcolor=#FF0000'; echo '>'; if ($isDoublon) echo '<a id="'.$tmp['id'].'" class="doublon" href="#">DOUBLON</a> - '; if (($tmp[id_reponse] == 1) || ($tmp[id_reponse] == 2) || ($tmp[id_reponse] == 4) || ($tmp[id_reponse] == 5)) echo '<a href="javascript:voir_annonce(\''.$tmp['id'].'\', \''.$value->host.'\')" onMouseOver="showPreview('.$tmp['id'].');" onMouseOut="hidePreview('.$tmp['id'].');">'.$tmp['poste'].'</a>'; if ($tmp[id_reponse] == 3) echo '<a href="javascript:voir_annonce3(\''.$tmp['url_reponse'].'\')" onMouseOver="showPreview('.$tmp['id'].');" onMouseOut="hidePreview('.$tmp['id'].');">'.$tmp['poste'].'</a>'; if ($tmp['urgent'] == 1) print " - <font class=r_bold>urgent</font>"; if ($tmp['gold'] == 1) print " - <font class=g_bold>gold</font>"; if ($tmp['cvtheque'] == 1) print " - CVthèque"; if ($tmp['url_reponse'] != '' && $tmp['id_reponse'] != 3) { echo '<br /><br />URL - '; $len = strlen($tmp['url_reponse']); if ($len > 50) { $link = substr($tmp['url_reponse'], 0, 47).'...'; } else { $link = $tmp['url_reponse']; } echo '<a href="'.$tmp['url_reponse'].'" style="color: #666;" target="_blank">'.$link.'</a>'; } // Début du div ou sera placé l'annonce echo '<br /><div id="preview_'.$tmp['id'].'" name="preview_'.$tmp['id'].'" class="tdStyle1" style="z-index: 1000; display: none; position: fixed; left: 0px; top: 0px; padding: 4px; border: 1px solid #666; background: #fff; text-align: left; width: 777px;" onMouseOver="showPreview('.$tmp['id'].');" onMouseOut="hidePreview('.$tmp['id'].');">'; $tmp["url"] = substr($tmp["url"], 7); $id_modele = getIdModeleByAnnonce($tmp['id_societe'], $tmp["id"], $tmp['domaine']); $tmp["poste"] = mb_strtoupper($tmp["poste"]); $isFnh = isFnhAnnonce($tmp['id']); $logo = ""; if ($isFnh) { $logo_jpg = getFnhLogo(); $logo = "<img align='center' border='0' src='".$logo_jpg."' />"; } else { if ($id_modele > 0) { if ($tmp['id_reponse'] == 1) { $logo_gif = "../fichiers/societes/".$tmp['id_societe']."/".$id_modele.".gif"; if (file_exists($logo_gif)) { $logo = "<img align=center border=0 src=".$logo_gif.">"; } } else { $rep = "../fichiers/societes/".$tmp['id_societe']."/".$id_modele; $logo_jpg = $rep.".jpg"; $logo_swf = $rep.".swf"; $logo_gif = $rep.".gif"; if (file_exists($logo_jpg)) { $logo = "<img align=center border=0 src=".$logo_jpg.">"; } elseif (file_exists($logo_swf)) $logo = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="120" height="600"> <param name=movie value="'.$logo_swf.'"> <param name=quality value=high> <embed src="'.$logo_swf.'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="120" height="600"></embed> </object>'; elseif (file_exists($logo_gif)) { $logo = "<img align=center border=0 src=".$logo_gif.">"; } } } } if (strlen($logo) > 0 && strlen($tmp['url']) > 0) $logo = "<a href=http://".$tmp['url']." target=_blank>".$logo."</a>"; if (strlen($tmp['url_reponse']) <= 0) { $tmp['url_reponse'] = "../jobs/repondre_annonce.php?id=".$tmp['id']."\" onClick=\""; if ($tmp['contact_email'] == "") $tmp['url_reponse'] .= "alert('".$traduction->aff_word("repondre_courrier", $tabTrad['only_word']).'\n'.$tmp['societe'].'\n'.str_replace("<br />", '\n', ereg_replace("[\r\n\t]", "", $tmp['adresse']))."');"; else $tmp['url_reponse'] .= "popUp(this.href, 'scroll', 540, 400);"; $tmp['url_reponse'] .= "return false;"; } ?> <table width="775" cellspacing="0" cellpadding="0" border=0> <? if ($tmp['id_reponse'] != "2") { ?> <tr> <td width="575" align=center valign=top> <table width="535" border=0 cellspacing=0 cellpadding=2> <tr> <td colspan="2" class="nom_societe"><?=$tmp['societe']?></td> </tr> <tr> <td colspan="2"><hr size=1 color=#000000></td> </tr> <tr> <td colspan="2" align="right"><?=date_2fr($tmp["date_affichage"], 1)?></td> </tr> <tr> <td align="right" class=bold><?=$traduction->aff_word("pays")?>&nbsp;:</td> <td align="left"><?=$tmp['pays0']?></td> </tr> <? if ($tmp['region']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("region")?>&nbsp;:</td> <td align="left"><?=$tmp['region']?></td> </tr> <? } if ($tmp['departement']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("departement")?>&nbsp;:</td> <td align="left"><?=$tmp['departement']?></td> </tr> <? } if ($tmp['ville']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("ville")?>&nbsp;:</td> <td align="left"><?=$tmp['ville']?></td> </tr> <? } if ($tmp['debut']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("debut_travail")?>&nbsp;:</td> <td align="left"><?=$tmp['debut']?></td> </tr> <? } ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("type_contrat")?>&nbsp;:</td> <td align="left"><?=$tmp['contrat']?></td> </tr> <? if ($tmp['emploi']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("type_emploi")?>&nbsp;:</td> <td align="left"><?=$tmp['emploi']?></td> </tr> <? } if ($tmp['salaire']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("salaire")?>&nbsp;:</td> <td align="left"><?=$tmp['salaire']?></td> </tr> <? } if ($tmp['experience']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("experience_metier")?>&nbsp;:</td> <td align="left"><?=$tab_experience[$tmp['experience']]?></td> </tr> <? } if ($tmp['reference']) { ?> <tr> <td align="right" class=bold><?=$traduction->aff_word("reference")?>&nbsp;:</td> <td align="left"><?=$tmp['reference']?></td> </tr> <? } ?> <tr> <td>&nbsp;</td> <td><hr size=1 color=#000000 width=405></td> </tr> <? if ($tmp['presentation']) { ?> <tr> <td valign=top align="right" class=bold><?=$traduction->aff_word("presentation")?>&nbsp;:</td> <td style="text-align: justify;"><?=$tmp['presentation']?></td> </tr> <tr> <td>&nbsp;</td> <td><hr size=1 color=#000000 width=405></td> </tr> <? } ?> <tr> <td valign="top" class=bold align="right"><?=$traduction->aff_word("poste")?>&nbsp;:</td> <td valign="top" class=titre_poste align=center><?=$tmp['poste']?></td> </tr> <tr> <td colspan=2>&nbsp;</td> </tr> <tr> <td valign="top" class=bold align="right"><?=$traduction->aff_word("description")?>&nbsp;:</td> <td style="text-align: justify;"><?=$tmp['description']?></td> </tr> <tr> <td width=100%>&nbsp;</td> <td width=405><hr size=1 color=#000000 width=405></td> </tr> <? if ($tmp['profil']) { ?> <tr> <td valign="top" align="right" class=bold><?=$traduction->aff_word("profil")?>&nbsp;:</td> <td valign="top" style="text-align: justify;"><?=$tmp['profil']?></td> </tr> <tr> <td>&nbsp;</td> <td><hr size=1 color=#000000 width=405></td> </tr> <? } if ($tmp['recommandation']) { ?> <tr> <td valign="top" align="left"></td> <td valign="top" style="text-align: justify;"><?=$tmp['recommandation']?></td> </tr> <tr> <td>&nbsp;</td> <td><hr size=1 color=#000000 width=405></td> </tr> <? } if ($tmp['contact_nom'] || $tmp['contact_prenom']) { ?> <tr> <td valign="top" align="right" class=bold><?=$traduction->aff_word("contact")?>&nbsp;:</td> <td valign="top" align="left"><?=$tmp['contact_prenom']?>&nbsp;<?=$tmp['contact_nom']?></td> </tr> <tr> <td>&nbsp;</td> <td><hr size=1 color=#000000 width=405></td> </tr> <? } ?> <? } elseif ($tmp['domaine'] != 'de') { ?> <tr> <td colspan=2><table width="755" align=right valign=top><tr><td><?=$tmp['presentation']?></td></tr></table></td> </tr> <? } ?> <tr> <td rowspan=6>&nbsp;</td> <td><a href="<?=$tmp['url_reponse']?>" target="_blank">&gt;&gt;&nbsp;<?=$traduction->aff_word("repondre_en_ligne")?></a></td> </tr> <tr> <td><a href="../jobs/affiche_imprime_annonce.php?id=<?=$tmp['id']?>" onClick="popUp(this.href, 'scroll', 540, 400);return false;" target="_blank">&gt;&gt;&nbsp;<?=$traduction->aff_word("version_imprimer")?></a></td> </tr> <tr> <td><a href="../jobs/send_friend_annonce.php?id=<?=$tmp['id']?>" onClick="popUp(this.href, 'clean', 400, 300);return false;" target="_blank">&gt;&gt;&nbsp;<?=$traduction->aff_word("envoi_ami")?></a></td> </tr> <tr> <td><a href="./affiche_liste.php?soc=<?=$tmp['societe_clean']?>">&gt;&gt;&nbsp;<?=$traduction->aff_word("toutes_offres")?> <?=$tmp['societe']?></a></td> </tr> <tr> <td><a href="../jobs/index.php">&gt;&gt;&nbsp;<?=$traduction->aff_word("nouvelle_recherche")?></a></td> </tr> <tr> <td><a href="../jobs/index.php" onClick="javascript:retour(); return false;">&lt;&lt;&nbsp;<?=$traduction->aff_word("retour")?></a></td> </tr> <? if ($tmp['id_reponse'] != "2") { ?> </table> </td> <td width="200" align=center class=black_bord valign=top> <table width="190" cellspacing=0 cellpadding=0 border=0> <tr> <td colspan="2" align="center" valign="top" class=bold><? if ($tmp['id_reponse'] != "5") { ?><br><? } ?><?=$logo?><br><br><?=$tmp['societe']?></td> </tr> <? if ($tmp['adresse']) { ?> <tr> <td align="center" colspan=2><?=$tmp['adresse']?></td> </tr> <tr> <td colspan=2>&nbsp;</td> </tr> <? } if ($tmp['contact_tel']) { ?> <tr> <td class=bold align=right><?=$traduction->aff_word("tel")?> :</td> <td align=center><?=$tmp['contact_tel']?></td> </tr> <? } if ($tmp['contact_fax']) { ?> <tr> <td class=bold align=right><?=$traduction->aff_word("fax")?> :</td> <td align=center><?=$tmp['contact_fax']?></td> </tr> <? } if ($tmp['url']) { ?> <tr> <td colspan=2 align=center><a href="http://<?=$tmp['url']?>" target="_blank"><?=$tmp['url']?></a></td> </tr> <? } ?> </table> </td> </tr> <? } ?> </table> <? echo '</div>'; // Fin du div ou sera placé l'annonce echo "</TD><TD align=center class=tdNext><b>".date_2fr($tmp['date_creation'], 1)."</b><br>".date_2fr($tmp['date_affichage'], 1); echo "</TD><TD align=center class=tdNext>".$tmp[societe]."<br>(<i><a href=".$value->host."login/login.php?login=".$infoSoc->email."&pass=".$infoSoc->password." target=_blank>".$infoSoc->nom."</a></i>)<br><a href=index.php?op=entreprise&ac=tableau_bord&id_societe=".$tmp['id_societe'].">compte</a></TD>"; $color = ''; switch($tmp[push_mail]) { case "0": $color = " bgcolor=#DBB7FF"; break; case "2": $color = " bgcolor=#CCCCCC"; break; default : ; } $type_rep = ""; switch ($tmp[id_reponse]) { case 1: $type_rep = "Standard"; break; case 2: $type_rep = "Chartée"; break; case 3: $type_rep = "Metamoteur"; break; case 4: $type_rep = "Reponse sur site"; break; case 5: $type_rep = "Semi-chartée"; break; } print " <td align=center class=tdNext> <table width=100% border=0 cellspacing=0 cellpadding=0> <tr> <td align=center class=cadreBas>".$tmp['contrat']." - ".$tmp['emploi']."</td> <td $color align=center rowspan=4 width=40%> <a onclick=\"javascript:colorannonce(this, '#CFFFCF');\" href=?op=agentalertes&action=modify_push&amp;id_annonce=".$tmp[id]." target=_blank>Modifier push</a><br><br> <a onclick=\"sendPush(this, ".$tmp['id']."); return false;\" href=\"#\">Envoyer Push</a> </td> </tr> <tr> <td align=center class=cadreBas>".(strlen($tmp['metier']) > 0 ? $tmp['metier'] : '<font class=gris_i>'.$tmp['categorie'].'</font>')."</td> </tr> <tr> <td align=center class=cadreBas>".$tmp[secteur]."</td> </tr> <tr> <td align=center>".($number < 500 ? '<font color="red">' : ($number > 1500 ? '<font color="orange">' : '<font color="green">')).$number."</font></td> </tr> </table> </td> <td align=center class=tdNext> <table width=100% border=0 cellspacing=0 cellpadding=0> <tr> <td align=center class=cadreBas>"; if (strlen($tabPushModif['regions']) > 0) { $tab = explode('/', $tabPushModif['regions']); foreach($tab AS $elem) { if (strlen($elem) <= 0) continue; if (strpos($elem, 'dep-') !== false) { echo $tab_departement[substr($elem, 4)]; $query_tmp = 'SELECT region FROM ref_departement WHERE id = "'.substr($elem, 4).'"'; $obj = $db->getObj($query_tmp); if ($obj) { echo ' - '.$tab_region[$obj->region]; $query_tmp = 'SELECT rp.code_pays FROM ref_pays rp INNER JOIN ref_region rr ON rr.pays = rp.id WHERE rr.id = "'.$obj->region.'"'; $obj = $db->getObj($query_tmp); if ($obj) echo ' ('.$obj->code_pays.')'; } } elseif (is_numeric($elem) === false) { echo '<font class=gris_i>'.$tmp['departement'].' - '.$tmp['region'].'</font> ('.$elem.')'; } else { echo '<font class=gris_i>'.$tmp['departement'].'</font> - '.$tab_region[$elem]; $query_tmp = 'SELECT rp.code_pays FROM ref_pays rp INNER JOIN ref_region rr ON rr.pays = rp.id WHERE rr.id = "'.$obj->region.'"'; $obj = $db->getObj($query_tmp); if ($obj) echo ' ('.$obj->code_pays.')'; } } } else echo $tmp['departement']." - ".$tmp['region']." (".$tmp['code_pays'].")"; echo "</td> </tr> <tr> <td align=center class=cadreBas>".$tmp[ville]."</td> </tr> <tr> <td align=center class=cadreBas>"; if (strlen($tabPushModif['metier']) > 0) { $tmpExp = array(); $tab = explode('/', $tabPushModif['metier']); foreach($tab AS $elem) { if (strlen($elem) <= 0) continue; $tmpMetier = explode('-', $elem); if (isset($tmpMetier[1])) { if (in_array($tmpMetier[1], $tmpExp) === true) continue; $tmpExp[] = $tmpMetier[1]; if ($tmpMetier[1] == $tmp['experience']) echo '<b>'.$tab_experience[$tmpMetier[1]].'</b>/'; else echo $tab_experience[$tmpMetier[1]].'/'; } } if (count($tmpExp) <= 0) echo '<font class=gris_i>'.$tab_experience[$tmp['experience']].'</font>'; } else echo $tab_experience[$tmp['experience']]; echo "</td> </tr> <tr> <td align=center>".$tabLangues[$tmp['id_langue']]->langue." - ".$tabLanguesNiveau[$tmp['id_langue_niveau']]->langue_niveau."</td> </tr> </table> </td> <td align=center class=tdNext> <table width=100% cellspacing=0 cellpadding=0 border=0> <tr> <td align=center class=cadreBas>$type_rep</td> </tr> <tr> <td align=center>".$tmp[compteur_vu]."&nbsp;/&nbsp;<a href=?op=gcand&ac=liste&id_annonce=".$tmp[id]."&statut=all target=_new>".$tmp[compteur_repondu]."</a></td> </tr> </table> </td> <td align=center class=tdNext> <table width=100% cellspacing=0 cellpadding=0 border=0> <tr> <td align=center class=cadreBas><a href=?op=annonces&ac=modifier&id_annonce=".$tmp['id']." target=_new>Modifier</a></td> </tr> <tr> <td align=center class=cadreBas><a href='' onClick=\"valid_delete('".$tmp['id']."'); return false;\">Supprimer</a></td> </tr> <tr> <td align=center><a href='' onClick='changeAff(".$tmp['id']."); return false;' id='changeAff_".$tmp['id']."'>".($tmp['affiche'] == 1 ? 'Mettre hors ligne' : 'Mettre en ligne')."</a></td> </tr> </table> </td> <td align=center class='tdNext gris'> <p style=\"color:#444;\"> &nbsp;".nl2br($tmp['push_res']).'</p>'; if (is_array($tabHisto[$tmp['id']])) { echo '<p style="color:#888; padding-top:5px;">'; foreach($tabHisto[$tmp['id']] as $histo) { echo $histo['type_modif'].' '.HumanDateTime($histo['date']).' par '.$histo['user']; if ($histo['new_annonce']) { echo ' [New ID : <a href="index.php?op=annonces&search4='.$histo['new_annonce'].'">'.$histo['new_annonce'].'</a>]'; } echo '<br />'; } echo '</p>'; } echo " </td> <td align=center>&nbsp;".$tmp['source']; if (!empty($tmp['source_ref'])) { echo '<br /><a href="redirect.php?site='.$tmp['source_ref'].'" target="_blank">Voir original</a>'; } echo '</td></tr>'; if (isset($doublon) && !$isDoublon) { $query2 = " SELECT a.*, rp.pays0, rp.code_pays FROM annonces a INNER JOIN ref_pays rp ON rp.id = a.pays WHERE a.id_societe = '".$tmp['id_societe']."' AND a.contrat = '".$tmp['id_contrat']."' AND a.domaine = '".$tmp['domaine']."' AND a.id != '".$tmp['id']."' AND ADDDATE(a.date_creation, INTERVAL 2 MONTH) > '".$tmp['date_creation']."' AND a.poste = \"".addslashes($tmp['poste'])."\" AND a.ville = \"".addslashes($tmp['ville'])."\" AND a.societe = \"".addslashes($tmp['societe'])."\" AND (a.id_societe != 1 OR (a.id_societe = 1 AND a.contact_email = \"".$tab_annonce['contact_email']."\")) ORDER BY a.id DESC"; $tabAnnonces2 = $db->getTab($query2); if (count($tabAnnonces2) > 0) { $tabId = array(); foreach($tabAnnonces2 as $annonc) { $tabId[] = $annonc['id']; } $tmpListAnnonceTab = annoncelist::getHistorique($tabId); $tmpTabHisto = createTabHisto($tmpListAnnonceTab); $tabHisto += $tmpTabHisto; //Additionne les 2 tableaux, contrairement à array_merge il garde les clés !! affAnnonce($tabAnnonces2, 1); foreach($tabAnnonces2 AS $tmpAnn) $tabNoAffAnnonce[] = $tmpAnn['id']; } } } } ?> Only this script is slow, all the others on the same server/domain/directory work great. On an other server, the same script works fine. The script takes up to 90% of CPU when running. Any ideas?

    Read the article

< Previous Page | 7 8 9 10 11