Search Results

Search found 319 results on 13 pages for 'mad wombat'.

Page 11/13 | < Previous Page | 7 8 9 10 11 12 13  | Next Page >

  • Load Spikes on a Apache MySQL Server with Wordpress MU

    - by Vikram Goyal
    Hi there, I am trying to investigate the reasons for some mysterious load spikes on a Linux Apache server (2.2.14) running PHP 5.2.9 on a dedicated server with enough processing power and memory. My primary web application is a Wordpress MU (2.9.2) installation. I have investigated and ruled out DOS attack, MySQL or Apache configuration issues. The log files don't give me anything of interest, except to tell me that there is severe load. The load (which can go up to 100) just seems to come and go. It helps that I have a script that checks every 3 minutes for the load, and restarts Apache. Restarting it helps, and the server comes back, till it happens again. There seems to be no set time frame, or visitor numbers on the site that can trigger this. Even a low number of concurrent visitors (20) can trigger it. I am almost convinced that there is a rewrite loop somewhere that is causing Apache to go mad. Apache is trying to serve something that is causing it to spawn more and more processes till it keels over. My question is: Given that I am convinced that this is a rewrite issue or something similar, how can I try and figure out what the issue is? What should I monitor? Apache logs are voluminous, and not very helpful. Of course, if this is not the issue, then at least knowing what to look for will help me eliminate this as an issue and look for something else. Thanks! Vikram

    Read the article

  • Deserializing JSON in WCF throws xml errors in .Net 4.0

    - by Syg
    Hi there. I'm going slidely mad over here, maybe someone else can figure out what's going on here. I have a WCF service exposing a function using webinvoke, like so: [OperationContract] [WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, UriTemplate = "registertokenpost" )] void RegisterDeviceTokenForYoumiePost(test token); The datacontract for the test class looks like this: [DataContract(Namespace="Zooma.Test", Name="test", IsReference=true)] public class test { string waarde; [DataMember(Name="waarde", Order=0)] public string Waarde { get { return waarde; } set { waarde = value; } } } When sending the following json message to the service, { "test": { "waarde": "bla" } } the trace log gives me errors (below). I have tried this with just a string instead of the datatype (void RegisterDeviceTokenForYoumiePost(string token); ) but i get the same error. All help is appreciated, can't figure it out. It looks like it's creating invalid xml from the json message, but i'm not doing any custom serialization here. The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'RegisterDeviceTokenForYoumiePost'. Unexpected end of file. **Following elements are not closed**: waarde, test, root.</Message><StackTrace> at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters)

    Read the article

  • Javascript Mouseover bubbling from children

    - by Nicky De Maeyer
    Ive got the following html setup: <div id="div1"> <div id="content1">blaat</div> <div id="content1">blaat2</div> </div> it is styled so you can NOT hover div1 without hovering one of the other 2 divs. Now i've got a mouseout on div1. The problem is that my div1.mouseout gets triggered when i move from content1 to content2, because their mouseouts are bubbling. and the event's target, currentTarget or relatedTarget properties are never div1, since it is never hovered directly... I've been searching mad for this, but I can only find articles and solutions for problems who are the reverse of what I need. It seems trivial but I can't get it to work... The mouseout of div1 should ONLY get triggered when the mouse leaves div1. One of the possibilities would be to set some data on mouse enter and mouseleave, but I'm convinced this should work out of the box, since it is just a mouseout... EDIT: bar.mouseleave(function(e) { if ($(e.currentTarget).attr('id') == bar.attr('id')) { bar.css('top', '-'+contentOuterHeight+'px'); $('#floatable-bar #floatable-bar-tabs span').removeClass('active'); } }); changed the mouseout to mouseleave and the code worked...

    Read the article

  • Count the prime numbers from 2 to 100 with simpler code than this

    - by RufioLJ
    It has to be with just functions, variables, loops, etc (Basic stuff). I'm having trouble coming up with the code from scratch from what I've I learned so far(Should be able to do it). Makes me really mad :/. If you could give me step by step to make sure I understand I'd really really appreciated. Thanks a bunch in advanced. How could I get the same result with a simpler code than this one: var primes=4; for (var counter = 2; counter <= 100; counter = counter + 1) { var isPrime = 0; if(isPrime === 0){ if(counter === 2){console.log(counter);} else if(counter === 3){console.log(counter);} else if(counter === 5){console.log(counter);} else if(counter === 7){console.log(counter);} else if(counter % 2 === 0){isPrime=0;} else if(counter % 3 === 0){isPrime=0;} else if(counter % 5 === 0){isPrime=0;} else if(counter % 7 === 0){isPrime=0;} else { console.log(counter); primes = primes + 1; } } } console.log("Counted: "+primes+" primes");

    Read the article

  • If Then Else Statement Condition Being Ignored?

    - by Matma
    I think im going mad but can some show me what im missing, it must be some stupidly simple i just cant see the wood for the trees. BOTH side of this if then else statement are being executed? Ive tried commenting out the true side and moving the condition to a seperate variable with the same result. However if i explicitly set the condition to 1=0 or 1=1 then the if then statement is operating as i would expect. i.e. only executing one side of the equation... The only time ive seen this sort of thing is when the compiler has crashed and is no longer compiling (without visible indication that its not) but ive restarted studio with the same results, ive cleaned the solution, built and rebuilt with no change? please show me the stupid mistake im making using vs2005 if it matters. Dim dset As DataSet = New DataSet If (CboCustomers.SelectedValue IsNot Nothing) AndAlso (CboCustomers.SelectedValue <> "") Then Dim Sql As String = "Select sal.SalesOrderNo As SalesOrder,cus.CustomerName,has.SerialNo, convert(varchar,sal.Dateofpurchase,103) as Date from [dbo].[Customer_Table] as cus " & _ " inner join [dbo].[Hasp_table] as has on has.CustomerID=cus.CustomerTag " & _ " inner join [dbo].[salesorder_table] as sal On sal.Hasp_ID =has.Hasp_ID Where cus.CustomerTag = '" & CboCustomers.SelectedValue.ToString & "'" Dim dap As SqlDataAdapter = New SqlDataAdapter(Sql, FormConnection) dap.Fill(dset, "dbo.Customer_Table") DGCustomer.DataSource = dset.Tables("dbo.Customer_Table") Else Dim erm As String = "wtf" End If

    Read the article

  • INSERT stored procedure does not work?

    - by vikitor
    Hello, I'm trying to make an insertion from one database called suspension to the table called Notification in the ANimals database. My stored procedure is this: ALTER PROCEDURE [dbo].[spCreateNotification] -- Add the parameters for the stored procedure here @notRecID int, @notName nvarchar(50), @notRecStatus nvarchar(1), @notAdded smalldatetime, @notByWho int AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here INSERT INTO Animals.dbo.Notification values (@notRecID, @notName, @notRecStatus, null, @notAdded, @notByWho); END The null inserting is to replenish one column that otherwise will not be filled, I've tried different ways, like using also the names for the columns after the name of the table and then only indicate in values the fields I've got. I know it is not a problem of the stored procedure because I executed it from the sql server management studio and it works introducing the parameters. Then I guess the problem must be in the repository when I call the stored procedure: public void createNotification(Notification not) { try { DB.spCreateNotification(not.NotRecID, not.NotName, not.NotRecStatus, (DateTime)not.NotAdded, (int)not.NotByWho); } catch { return; } } It does not record the value in the database. I've been debugging and getting mad about this, because it works when I execute it manually, but not when I automatize the proccess in my application. Does anyone see anything wrong with my code? Thank you

    Read the article

  • HELP ME my dataset xsd content HAS GONE

    - by Mustafa Magdy
    I'm working in an erp project using Visual Studio 2008 Sp1, I've a typed dataset it was containg alot of datatable and alot of table adapter the .Designer.cs file was 8 MB, suddenly when i was trying to openit using visual studio designer the following code comes to me <?xml version="1.0" encoding="utf-8"?> <xs:schema id="erpDataSet" targetNamespace="http://tempuri.org/erpDataSet1.xsd" xmlns:mstns="http://tempuri.org/erpDataSet1.xsd" xmlns="http://tempuri.org/erpDataSet1.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified"> <xs:annotation> <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource"> <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <Connections> <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="erpConnectionString" IsAppSettingsProperty="true" Modifier="Assembly" Name="erpConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Sbic.Pro My XSD file content has gone, :( :( :( I don't understand why, and how can i recover it. i mad something but i don't know if it is the reason for that or not, My connectionstring was in the settings "app.config" i removed it and add it to the resources of another project that is refernced by the main project. what can i do, pleaze help me.

    Read the article

  • Which pdf elements could cause crashes?

    - by Felixyz
    This is a very general question but it's based on a specific problem. I've created a pdf reader app for the iPad and it works fine except for certain pdf pages which always crash the app. We now found out that the very same pages cause Safari to crash as well, so as I had started to suspect the problem is somewhere in Apple's pdf rendering code. From what I have been able to see, the crashing pages cause the rendering libraries to start allocating memory like mad until the app is killed. I have nothing else to help me pinpoint what triggers this process. It doesn't necessarily happen with the largest documents, or the ones with the most shapes. In fact, we haven't found any parameter that helps us predict which pages will crash and which not. Now we just discovered that running the pages through a consumer program that lets you merge docs gets rid of the problem, but I haven't been able to detect which attribute or element it is that is the key. Changing documents by hand is also not an option for us in the long run. We need to run an automated process on our server. I'm hoping someone with deeper knowledge about the pdf file format would be able to point me in a reasonable direction to look for document features that could cause this kind of behavior. All I've found so far is something about JBIG2 images, and I don't think we have any of those.

    Read the article

  • Weird MySQL behavior, seems like a SQL bug

    - by Daniel Magliola
    I'm getting a very strange behavior in MySQL, which looks like some kind of weird bug. I know it's common to blame the tried and tested tool for one's mistakes, but I've been going around this for a while. I have 2 tables, I, with 2797 records, and C, with 1429. C references I. I want to delete all records in I that are not used by C, so i'm doing: select * from i where id not in (select id_i from c); That returns 0 records, which, given the record counts in each table, is physically impossible. I'm also pretty sure that the query is right, since it's the same type of query i've been using for the last 2 hours to clean up other tables with orphaned records. To make things even weirder... select * from i where id in (select id_i from c); DOES work, and brings me the 1297 records that I do NOT want to delete. So, IN works, but NOT IN doesn't. Even worse: select * from i where id not in ( select i.id from i inner join c ON i.id = c.id_i ); That DOES work, although it should be equivalent to the first query (i'm just trying mad stuff at this point). Alas, I can't use this query to delete, because I'm using the same table i'm deleting from in the subquery. I'm assuming something in my database is corrupt at this point. In case it matters, these are all MyISAM tables without any foreign keys, whatsoever, and I've run the same queries in my dev machine and in the production server with the same result, so whatever corruption there might be survived a mysqldump / source cycle, which sounds awfully strange. Any ideas on what could be going wrong, or, even more importantly, how I can fix/work around this? Thanks! Daniel

    Read the article

  • How do I make a serialization class for this?

    - by chobo2
    I have something like this (sorry for the bad names) <root xmlns="http://www.domain.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.Domain.com Schema.xsd> <product></product> <SomeHighLevelElement> <anotherElment> <lowestElement> </lowestElement> </anotherElment> </SomeHighLevelElement> </root> I have something like this for my class public class MyClass { public MyClass() { ListWrapper= new List<UserInfo>(); } public string product{ get; set; } public List<SomeHighLevelElement> ListWrapper{ get; set; } } public class SomeHighLevelElement { public string lowestElement{ get; set; } } But I don't know how to write the code for the "anotherElement" not sure if I have to make another wrapper around it. Edit I know get a error in my actual xml file. I have this in my tag xmlns="http://www.domain.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.Domain.com Schema.xsd Throws an exception on the root line saying there was a error with this stuff. So I don't know if it is mad at the schemaLocation since I am using local host right now or what.

    Read the article

  • Grep expression with special file names

    - by user2919185
    i am a real beginner in csh/tcsh scripting and that's why i need your help. The problem is I have to go through some regular files in directories and find those files, that have their own name in its content. In the following piece of script is cycle in which I am going through paths and using grep to find the file's name in its content. What is surely correct is $something:q - is array of paths where i have to find files. The next variable is name in which is only name of current file. for example: /home/computer/text.txt (paths) and: text.txt (name) And my biggest problem is to find names of files in their content. It's quite difficult for me to write correct grep for this, cause the names of files and directories that i am passing through are mad. Here are some of them: /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/!_1 /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/dam/$user/:e/'/-r /home/OS/pocitacove/testovaci_adresar/z/test3/skusime/ taketo/ taketo /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/.a=b /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/@ /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/: /home/OS/pocitacove/testovaci_adresar/z/test4.pre_expertov/.-bla/.-bla/'ano' foreach paths ($something:q) set name = "$paths:t" @ number = (`grep -Ec "$name" "$paths"`) if ($number != 0) then echo -n "$paths " echo $number endif @ number = 0 end

    Read the article

  • Strange behaviour of CheckBox and TwoWay bound property

    - by walkor
    Hello, everyone. I fell in the following situation: I have a main UserControl with a DataGrid (which contains List). I need to show different panels depending on properties of the selected row(object). So i've created 2 controls and included them into this main control. Main control has 2 public properties - public List<ComplexObject> SourceList { get; set; } and public ComplexObject CurrentObject { get; set; } Pseudo-code: <UserControl x:Name="Main"> <DataGrid ItemsSource="{Binding SourceList}" SelectedItem="{Binding CurrentObject, Mode=TwoWay}"/> <Controls:RightPanelFirst Visibility="condition2"/> <Controls:RightPanelSecond Visibility="condition2"/> </UserControl> RightPanelFirst and RightPanelSecond have the following xaml: <UserControl> <... content here...> <CheckBox IsChecked="{Binding CurrentObject.ComplexProperty.SimpleProperty1, Mode=TwoWay}"> <CheckBox IsChecked="{Binding CurrentObject.ComplexProperty.SimpleProperty2, Mode=TwoWay}" x:Name="cbSecond"> <TextBox IsEnabled="{Binding IsChecked, ElementName=cbSecond}"/> </UserControl> So, my actual steps: Check both checkboxes (object values are set to true) Make other actions in code behind which modify CurrentObject. Then i want UI to reflect the changes, so I call NotifyPropertyChanged("CurrentObject"); SimpleProperty1 remains the same, but SimpleProperty2 resets to false I have no idea why this happens, can anyone help me please? Silverlight drives me mad.

    Read the article

  • encryption in c#

    - by Raja
    i am implementing on algorithm in c#. it has encrypt one word . i have check using decrypt also. now i am using a textbox. want to pass a string in that text box that gives my whole string as cypher text. i dont know how to use. i have mad one loop there and calacated the string length. now suppose my function is it is PasswordEncryptor.cs file public static double REncryptText(double m) {// code } this fuction is doing a single number convertion into the encrpt and in code i know this is wrong i want try in this for (int i = 0; i <= 32; i++) { int [] cyph = new int[5]; // cyph=PasswordEncryptor.REncryptText(i); cypherText.Text = c; } i want that after entering the string into textbox it will call that string till string length and and by adding all the part of string one by one, i will get a final encrpytion code and will use further please help me in doing this

    Read the article

  • UITableView reloaddata doesn't reload immediately

    - by D33
    Hi everyone. I'm trying to work with online data in my iPhone app. But I'm getting mad because of this: I have object for downloading data with NSURLConnection. Method starting the work with connection (and other stuff) in separate thread - [ NSThread detachNewThreadSelector:@selector( doConnectionInNewThread ) toTarget: self withObject: nil ]; When data are loaded (connectionDidFinishLoading) I give them to my viewController. This all stuff works fine. When I use breakpoints or NSLog I have the data ready to show in UITableView. When I call reloadData, nothing happens immediately. It reloads data after maybe 2 seconds (- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath is called after this delay). BUT when I slide the tableView, it reloads data immediately. So the connection and so on works fine but it just doesn't reload the data. Why? I thought it could be due to blocked mainThread by URLConnection. But now I use it in separate thread and it is still the same...

    Read the article

  • ERROR 2019 Linker Error Visual Studio

    - by Corrie Duck
    Hey I hope someone can tell me know to fix this issue I am having i keep getting an error 2019 from Visual studio for the following file. Now most of the functions have been removed so excuse the empty varriables etc. Error error LNK2019: unresolved external symbol "void * __cdecl OpenOneDevice(void *,struct _SP_DEVICE_INTERFACE_DATA *,char *)" (?OpenOneDevice@@YAPAXPAXPAU_SP_DEVICE_INTERFACE_DATA@@PAD@Z) referenced in function _wmain c:\Users\K\documents\visual studio 2010\Projects\test2\test2\test2.obj test2 #include "stdafx.h" #include <windows.h> #include <setupapi.h> SP_DEVICE_INTERFACE_DATA deviceInfoData; HDEVINFO hwDeviceInfo; HANDLE hOut; char *devName; // HANDLE OpenOneDevice(IN HDEVINFO hwDeviceInfo,IN PSP_DEVICE_INTERFACE_DATA DeviceInfoData,IN char *devName); // HANDLE OpenOneDevice(IN HDEVINFO HardwareDeviceInfo,IN PSP_DEVICE_INTERFACE_DATA DeviceInfoData,IN char *devName) { PSP_DEVICE_INTERFACE_DETAIL_DATA functionClassDeviceData = NULL; ULONG predictedLength = 0, requiredLength = 0; HANDLE hOut = INVALID_HANDLE_VALUE; SetupDiGetDeviceInterfaceDetail(HardwareDeviceInfo, DeviceInfoData, NULL, 0, &requiredLength, NULL); predictedLength = requiredLength; functionClassDeviceData = (PSP_DEVICE_INTERFACE_DETAIL_DATA)malloc(predictedLength); if(NULL == functionClassDeviceData) { return hOut; } functionClassDeviceData->cbSize = sizeof (SP_DEVICE_INTERFACE_DETAIL_DATA); if (!SetupDiGetDeviceInterfaceDetail(HardwareDeviceInfo, DeviceInfoData, functionClassDeviceData, predictedLength, &requiredLength, NULL)) { free( functionClassDeviceData ); return hOut; } //strcpy(devName,functionClassDeviceData->DevicePath) ; hOut = CreateFile(functionClassDeviceData->DevicePath, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL); free(functionClassDeviceData); return hOut; } // int _tmain(int argc, _TCHAR* argv[]) { hOut = OpenOneDevice (hwDeviceInfo, &deviceInfoData, devName); if(hOut != INVALID_HANDLE_VALUE) { // error report } return 0; } Been driving me mad for hours. Any help appreciated. SOLVED THANKS TO CHRIS :-) Add #pragma comment (lib, "Setupapi.lib") Thanks

    Read the article

  • AIR File.resolvePath won't work anymore

    - by Palleas
    Hi all, I'm having a very strange issue, it looks like my application can't create file anymore. It works w/ directories, but the so-many-times-used resolvePath() methods doesn't. Here is what I do : var databaseFileContent : File = new File(File.desktopDirectory.nativePath + "/testing"); databaseFileContent.createDirectory(); databaseFileContent.resolvePath("test"); (Here I'm trying on desktop but that's the same w/ applicationStorageDirectory) When I execute this, it works only for the "testing" folder which is actually created, but my file isn't. I tried to create another application, doing this : trace(File.desktopDirectory.resolvePath("maiswtf.db").exists); trace(File.applicationStorageDirectory.resolvePath("wtf.db").exists); Both are displaying "false". Am I missing something here? I have another application with this code : var databaseFileContent : File = File.applicationStorageDirectory.resolvePath(File.separator + "sitra.db"); When I run this one, it works perfectly! My file is created at /sitra.db! Any hints? I thinks I'm going mad :/ Thanks!

    Read the article

  • Update Web Reference in Visual Studio

    - by NeilD
    Hi, I have inherited a web site project that makes use of a number of WCF Web Services hosted on a BizTalk server. We have two environments that I need to deploy this project to, with different URLs for the different BizTalk servers. i.e. In the Staging environment, I need to point the services at xx.xx.xx.101 In the Live environment, I need to point them at xx.xx.xx.102, or whatever. Currently, we've got all of the URLs stored in keys in the web.config file, so that we can change them dynamically... Unfortunately this isn't working! If I change the URL in the web.config to something other than what the project was compiled with, I get an error when calling the service: Server did not recognize the value of HTTP Header SOAPAction: xx.xx.xx.101\ServiceName\MethodName I'm told that the only way they've known to deploy this is to update the web.config URLs, change all of the web references in Visual Studio to match, click on "update web reference" for each reference in Visual Studio, and then compile. It's driving me mad! I've written a pre-build NAnt script to go through and replace all instances of the URL found anywhere in the project directory, and even that isn't making any difference. There must be something else being pulled down from the service when I click the "update reference", but I'm new to working with web services, and so I'm not sure what. Does anyone have any ideas? Is there a way to do this programatically? Thanks.

    Read the article

  • JPA / Hibernate checks conditions in merge()

    - by bert
    Working with JPA / Hibernate in an OSIV Web environment is driving me mad ;) Following scenario: I have an entity A that is loaded via JPA and has a collection of B entities. Those B entities have a required field. When the user adds a new B to A by pressing a link in the webapp, that required field is not set (since there is no sensible default value). Upon the next http request, the OSIV filter tries to merge the A entity, but this fails as Hibernate complains that the new B has a required field is not set. javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value Reading the JPA spec, i see no sign that those checks are required in the merge phase (i have no transaction active) I can't keep the collection of B's outside of A and only add them to A when the user presses 'save' (aka entitymanager.persist()) as the place where the save button is does not know about the B's, only about A. Also A and B are only examples, i have similar stuff all over the place .. Any ideas? Do other JPA implementaions behave the same here? Thanks in advance.

    Read the article

  • Java Days & Bookings

    - by sys_debug
    Ok this is an extension of a question I asked about earlier yet this is the next step that is unclear to me. Everything else will be ready and this part is driving me mad! some members provided great help and I already made progress with that info, but this is just another obstacle. I am creating a booking object (as was suggested) that will have a start date and end date. each booking will also have a number of seats associated with it (that I require to reserve). The total available number of seats any given day 46 (as the total capacity of the hall is 46 seats). so in assumption that I have a booking to be made in the system, and start date is 1st jan and end date is 10th jan. The question is how can I check the remaining seats in all those days between the range to see if requested number could be hosted or not? and then when the second booking is made, it will have to see that the days in this range already have less than 46 and decrement further if possible to host the reservation. one of the members, and I appreciate his effort, gladly contributed a method to compare if this booking is after or before the existing bookings. The code provided is here: public boolean overlapsWithExisting(Booking booking) { final Date early = booking.getStart(); final Date late = booking.getEnd(); for(Booking existing : existingBookings) { if(!(early.isAfter(existing.getEnd() || late.isBefore(existing.getStart())) return true; } return false; } I just want to know how to associate 46 with each day and keep record of days that are decremented by bookings. Thanks and reallllllly appreciated :D

    Read the article

  • Separate "Year" to several worksheets according to one column....

    - by HACHI
    hello! This task is driving me mad... please help! Instead of manually type in the data, i have used VBA to find the year range, put into one column and delete all duplicate ones. But since excel could give more than 20 years, it would be tedious to do all the filtering manually. AND, now i need excel to separate the rows that contain the specific year range in any one the three columns and put them into a new sheet. e.g. The years that excel could find in the three columns(F:H) are ( 2001,2003,2006,2010, 2012,2020.....2033).. and they are pasted in column "S" in sheet 1. How could i tell excel create new sheets for the years ( sheets 2001, sheets 2003, sheet2006....),search through column (F:H) in sheet 1 to see if ANY of those columns contain that year, and paste them into the new sheet. To be more specific, in the newly created "Sheet 2001", the entire row where column(F:H) contains "2001" should be pasted. and in the newly created "Sheet 2033", the entire row where column(F:H) contains "2033" should be pasted.. Enclosed please find the reference. http://www.speedyshare.com/files/23851477/Book32.xls I have got sheet "2002" and "2003" here as results but for the real one i will need more years' sheets (as many as how many excel could extract in the previous stage; as shown in column L ) ...... I think this task should be quite usual (extracting by date), but i couldn't google the result....Pleas help!!I am very clueless about how to do LOOPING.. so please advice and give in more details! Thanks

    Read the article

  • php weird bug where an array is not an array !

    - by iko
    I've been going mad trying to figure out why an array would not be an array in php. For a reason I can't understand I have a bug in a smarty class. The code is this : $compiled_tags = array(); for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) { $this->_current_line_no += substr_count($text_blocks[$i], "\n"); // I tried array push instead to see // bug is here array_push($compiled_tags,$this->_compile_tag($template_tags[$i])); //$compiled_tags[] = $this->_compile_tag($template_tags[$i]); $this->_current_line_no += substr_count($template_tags[$i], "\n"); } the error message is Warning: array_push() expects parameter 1 to be array, integer given in .... OR before with [] Warning: Cannot use a scalar value as an array in .... I trying a var_debug on $compiled_tags and as soon I enter the for loop is not an array anymore but an integer. I tried renaming the variable, but same problem. I'm sure is something simple that I missed but I can't figure it out. Any help is (as always) welcomed !

    Read the article

  • Partitioning recommendations for a Proxmox VM Server (OpenVZ)

    - by luison
    We are new to virtualization and we are planning to turn our online server into a virualized one, mainly for maintenance, backup and recovery improvements. Initially we would only have one real virtual system with load plus 1-3 copys for testing and recovering and maybe a small centralized syslog virtual machine. We would like, if possible the host machine to include an iptables plus rsync to back up to other machines and some other global security systems. Due to this and the offerings of our hosting supplier we are mainly considering Proxmox for its simplicity (we like the idea of its web admin panel) and as I also understand that the container approach of OpenVMZ systems may fit well resource wise with our setup. The base system comes with debian so we can personalise it to our requirements. Proxmox installations default installs an LVM partition for the VMs. Our doubts are with the fact of what would be the best partition structure for this considering that: we would like to have a mirror of the root partition we could boot from if required (our provider supports booting the system from another partition via control panel) we ideally would like to have a partition that could be shared among the VM systems. We still don't know if this is possible directly with OpenVMZ containers, otherwise we are considering doing this by sharing it via NFS on the host machine. we want to use the backup system available on the proxmox host administrator to programme VMs backups and then rsync it to another machine. With this based on a Linux Raid of aprox (750Gb) we are considering something like: ext3_1/ - (20Gb) ext3_2/bak_root - (20Gb) mostly unmounted, root partition sync LVM_1 /var/lib/vz - (390Gb) partition for virtual images LVM_2 /shared_data - (30Gb) LVM_3 /backups - (300Gb) where all backups would be allocated Our initial tests with Proxmox seem to have issues with snapshots backups like this, perhaps caused by the fact that they can not be done to another LVM partition (error: command 'lvcreate --size 1024M --snapshot --name vzsnap-ns204084.XXX.net-0 /dev/pve/LV' failed with exit code 5) in which case we might have to use a standart ext3 partition (but unsure if we can do this with the 4 primary partition limitations). Does this makes more or less sense? Would it be mad to for example write VMs /var/logs to a NFS mounted partition (on the host system)? Are their any other easier ways to mount host system partitions (or folders) to the VMs?

    Read the article

  • How TiVo is messing up customer support.

    - by James Fleming
    Ok,  So I've gotten a TiVo and overall, I'm happy, but there have been issues and I suspect I've a defective unit. - Now the nice folks after many service calls were happy to swap it out, and to ensure continuity of service, they sent me a new unit (after a $109 deposit).  That was yesterday. Today, when we go to watch a little TV, and wait for our replacement unit to arrive we find our TiVo service has been suspended. WTF? They have an exchange program, but your unit your waiting to exchange is as dead as a doornail until the replacement arrives. How hard is it to keep the old unit active for an extra week? Here is the exchange w/Tivo below... You are currently number 1 in the queue. We apologize for the delay. We will assign you to an agent as soon as one is available.The average amount of time a customer has to wait is 00:13.  Kaylene (Listening)  Kaylene: Thank you for contacting TiVo! My name is Kaylene. So that I may better assist you, are you an existing customer?  james Fleming: yes I am, but I'm now having second thoughts about being one    Kaylene: Thank you for verifying your information. How may I assist you today James?  james Fleming: I've been having issues w/a tivo box & I'm getting a replacement sent out to me (after paying an additional deposit) and now my current unit is no longer activated  Kaylene: I can help you today!  Kaylene: When we process an exchange we do transfer over the service to the replacement box so it is active and ready to go when you receive it.  james Fleming: which is to say you also make my current box worthless until such time I receive a new box?!?!?  Kaylene: I apologize that your original box was deactivated so we could activate your replacement box.  james Fleming: Why on Earth would I bother to pay in advance for a new box if you were going to kill my existing box.  Kaylene: What features are you needing to use on your current box?  james Fleming: I need to be able to access my netflix subscription (if I'm lucky enough to have it work without rebooting)  Kaylene: Can I have you verify the TiVo Service Number of your TiVo box please?  james Fleming: 7460011906979b4  Kaylene: We have your current box temporary service but not all features are available with temporary service as it is not paid for service.  Kaylene: If you like I can transfer your service back to your current box for now. Then once you receive the new box you will have to call in and have the service transferred back to the new box.  james Fleming: Not paid for? Let's see> one tivo box + 3 year service plan + monthly service + $109 deposit on a second box = what?  Kaylene: Would you like me to transfer your service back to your current box?  james Fleming: Yes - that would be helpful  Kaylene: All you will need to do is contact us again once you receive the new box so we can transfer it back.  Kaylene: I have put your service back on TiVo box 7460011906979b4.  james Fleming: What would also be helpful is your firm informing me to how you'd be cutting service in the interim.  james Fleming: Again - I opted to pay to have a second box delivered BEFORE returning the box I have - thus trying to have a continuity of service..  Kaylene: This is not something we normally do so it is important when you contact us to transfer the service back to the new box when you receive it that you reference this case number: 110622-006089.  Kaylene: I apologize about the inconvenience. You may need  force a few connections for the box to recognize the service again.  james Fleming: If it's not something you normally do than WHY would you have a $109 fee and a term for the service.  james Fleming: I am not mad at you, but your company is not impressing me and I'm blogging about this experience  Kaylene: Again I apologize about the inconvenience but you should be good to go now. Is there anything else I can help you with today?  james Fleming: so I need to go through the re-actviate process or is that somethign you do  Kaylene: When you receive the new TiVo box you need to contact us so we can transfer the service to the new box for you.  james Fleming: sure  Kaylene: Is there anything else I can help you with today James?  james Fleming: Nope - please email this transcript to me  Kaylene: I apologize but we do not have the ability to e-mail you a copy of this transcript. You can view it online at  http://www.tivo.com when you sign into your account or you can copy and paste it now to save it.  Kaylene: Thank you for contacting TiVo today. Your reference number for our conversation is 110622-006089. You can save this for your records, and if necessary, provide this to a later agent to pull up what we discussed. There will be a brief satisfaction survey emailed to you. We would appreciate any feedback on your TiVo Chat Support experience today.  Kaylene: Thank you for using TiVo Chat and have a great day James! Good-bye.  Kaylene has disconnected.

    Read the article

  • The Top Ten Security Top Ten Lists

    - by Troy Kitch
    As a marketer, we're always putting together the top 3, or 5 best, or an assortment of top ten lists. So instead of going that route, I've put together my top ten security top ten lists. These are not only for security practitioners, but also for the average Joe/Jane; because who isn't concerned about security these days? Now, there might not be ten for each one of these lists, but the title works best that way. Starting with my number ten (in no particular order): 10. Top 10 Most Influential Security-Related Movies Amrit Williams pulls together a great collection of security-related movies. He asks for comments on which one made you want to get into the business. I would have to say that my most influential movie(s), that made me want to get into the business of "stopping the bad guys" would have to be the James Bond series. I grew up on James Bond movies: thwarting the bad guy and saving the world. I recall being both ecstatic and worried when Silicon Valley-themed "A View to A Kill" hit theaters: "An investigation of a horse-racing scam leads 007 to a mad industrialist who plans to create a worldwide microchip monopoly by destroying California's Silicon Valley." Yikes! 9. Top Ten Security Careers From movies that got you into the career, here’s a top 10 list of security-related careers. It starts with number then, Information Security Analyst and ends with number one, Malware Analyst. They point out the significant growth in security careers and indicate that "according to the Bureau of Labor Statistics, the field is expected to experience growth rates of 22% between 2010-2020. If you are interested in getting into the field, Oracle has many great opportunities all around the world.  8. Top 125 Network Security Tools A bit outside of the range of 10, the top 125 Network Security Tools is an important list because it includes a prioritized list of key security tools practitioners are using in the hacking community, regardless of whether they are vendor supplied or open source. The exhaustive list provides ratings, reviews, searching, and sorting. 7. Top 10 Security Practices I have to give a shout out to my alma mater, Cal Poly, SLO: Go Mustangs! They have compiled their list of top 10 practices for students and faculty to follow. Educational institutions are a common target of web based attacks and miscellaneous errors according to the 2014 Verizon Data Breach Investigations Report.    6. (ISC)2 Top 10 Safe and Secure Online Tips for Parents This list is arguably the most important list on my list. The tips were "gathered from (ISC)2 member volunteers who participate in the organization’s Safe and Secure Online program, a worldwide initiative that brings top cyber security experts into schools to teach children ages 11-14 how to protect themselves in a cyber-connected world…If you are a parent, educator or organization that would like the Safe and Secure Online presentation delivered at your local school, or would like more information about the program, please visit here.” 5. Top Ten Data Breaches of the Past 12 Months This type of list is always changing, so it's nice to have a current one here from Techrader.com. They've compiled and commented on the top breaches. It is likely that most readers here were effected in some way or another. 4. Top Ten Security Comic Books Although mostly physical security controls, I threw this one in for fun. My vote for #1 (not on the list) would be Professor X. The guy can breach confidentiality, integrity, and availability just by messing with your thoughts. 3. The IOUG Data Security Survey's Top 10+ Threats to Organizations The Independent Oracle Users Group annual survey on enterprise data security, Leaders Vs. Laggards, highlights what Oracle Database users deem as the top 12 threats to their organization. You can find a nice graph on page 9; Figure 7: Greatest Threats to Data Security. 2. The Ten Most Common Database Security Vulnerabilities Though I don't necessarily agree with all of the vulnerabilities in this order...I like a list that focuses on where two-thirds of your sensitive and regulated data resides (Source: IDC).  1. OWASP Top Ten Project The Online Web Application Security Project puts together their annual list of the 10 most critical web application security risks that organizations should be including in their overall security, business risk and compliance plans. In particular, SQL injection risks continues to rear its ugly head each year. Oracle Audit Vault and Database Firewall can help prevent SQL injection attacks and monitor database and system activity as a detective security control. Did I miss any?

    Read the article

  • BizTalk &ndash; Routing failure on Delivery Notifications (BizTalk 2006 R2 to 2013)

    - by S.E.R.
    Originally posted on: http://geekswithblogs.net/SERivas/archive/2013/11/11/biztalk-routing-failure-on-delivery-notifications.aspxThis is a detailed explanation of a something I posted a few month ago on stackoverflow, concerning a weird behavior (a bug, really…) of the delivery notifications in BizTalk. Reminder: what are delivery notifications Mechanism BizTalk has the ability to automatically publish positive acknowledgments (ACK) when it has succeeded transmitting a message or negative acknowledgments (NACK) in case of a transmission failure. Orchestrations can use delivery notifications to subscribe to those ACKs and NACKs in order to know if a message sent on a one-way send port has been successfully transmitted. Delivery Notifications can be “activated” in two ways: The most common and easy way is to set the Delivery Notification property of a logical send port (in the orchestration designer) to Transmitted: Another way is to set the BTS.AckRequired context property of the message to be sent to true: NOTE: fundamentally, those methods are strictly equivalent since the fact of setting the Delivery Notification to Transmitted on the send port only tells BizTalk the BTS.AckRequired context property has to be set to true on the outgoing message. Related context properties ACKs and NACKs have a common set of propoted context properties, which are : Propriété Description AckType Equals ACK when successful or NACK otherwise AckID MessageID of the message concerned by the acknowledgment AckOwnerID InstanceID of the instance associated with the acknowledgment AckSendPortID ID of the send port AckSendPortName Name of the send port AckOutboundTransportLocation URI of the send port AckReceivePortID ID of the port the message came from AckReceivePortName Name of the port the message came from AckInboundTransportLocation URI of the port the message came from Detailed behavior The way Delivery Notifications are handled by BizTalk is peculiar compared to the standard behavior of the Message Box: if no active subscription exists for the acknowledgment, it is simply discarded. The direct consequence of this is that there can be no routing failure for an acknowledgment, and an acknowledgment cannot be suspended. Moreover, when a message is sent to a send port where Delivery Notification = Transmitted, a correlation set is initialized and a correlation token is attached to the message (Context property: CorrelationToken). This correlation token will also be attached to the acknowledgment. So when the acknowledgment is issued, it is automatically routed to the source orchestration. Finally, when a NACK is received by the source orchestration, a DeliveryFailureException is thrown, which can be caught in Catch section. Context of the problem Consider this scenario: In an orchestration, Delivery Notifications are activated on a One-Way send port In case of a transmission failure, the messaging instance is suspended and the orchestration catches an exception (DeliveryFailureException). When the exception is caught, the orchestration does some logging and then terminates (thanks to a Terminate shape). So that leaves only the suspended messaging instance, waiting to be resumed. Symptoms Once the problem that caused the transmission failure is solved, the messaging instance is resumed. Considering what was said in the reminder, we would expect the instance to complete, leaving no active or suspended instance. Nevertheless, the result is that the messaging instance is once more suspended, this time because of a routing failure: The routing failure report shows that the suspended message has the following attached properties: Explanation Those properties clearly indicate that the message being suspended is an acknowledgment (ACK in this case), which was published in the message box and was supended because no subscribers were found. This makes sense, since the source orchestration was terminated before we resumed the messaging instance. So its subscription to the acknowledgments was no longer active when the ACK was published, which explains the routing failure. But this behavior is in direct contradiction with what was said earlier: an acknowledgment must be discarded when no subscriber is found and therefore should not be suspended. Cause It is indeed an outright bug, which appeared with the SP1 of BizTalk 2006 R2 and was never corrected since then: not in the next 4 CUs, not in BizTalk 2009, not in 2010 and not event in 2013 – though I haven’t tested CU1 and CU2 for this last edition, but I bet there is nothing to be expected from those CUs (on this particular point). Side effects This bug can have pretty nasty side effects: this behavior can be propagated to other ports, due to routing mechanisms. For instance: you have configured the ESB Toolkit and have activated the “Enable routing failure for failed messages”. The result will be that the ESB Exception SQL send port will also try and publish ACKs or NACKs concerning its own messaging instances. In itself, this is already messy, but remember that those acknowledgments will also have the source correlation token attached to them… See how far it goes? Well, actually there is more: in SQL send ports, transactions will be rolled back because of the routing failure (I guess it also happens with other adapters - like Oracle, but I haven’t tested them). Again, think of what happens when the send port is the ESB Exception send port: your BizTalk box is going mad, but you have no idea since no exception can be written in the exception database! All of this can be tricky to diagnose, I can tell you that… Solution There is no real solution, only a work-around, but it won’t solve all of the problems and side effects. The idea is to create an orchestration which subscribes to all acknowledgments. That is to say: The message type of the incoming message will be XmlDocument The BTS.AckType property exists The logical receive port will use direct binding By doing so, all acknowledgments will be consumed by an instance of this orchestration, thus avoiding the routing failure. Here is an example of what this orchestration could look like: In order not to pollute the HAT and the DTA Db (after all, this orchestration is only meant to be a palliative to some faulty internal BizTalk mechanism, so there should be no trace of its execution), all tracking must be deactivated:

    Read the article

< Previous Page | 7 8 9 10 11 12 13  | Next Page >