Search Results

Search found 2037 results on 82 pages for 'khanna param'.

Page 12/82 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Detect, Analyze, Act – Fast!

    - by Ajay Khanna
    In fast changing business environment, it becomes crucial to identify business opportunities and business issues as soon as possible. If identified at the right time, business managers can address issues before they escalate to serious problems and can take advantage of the new opportunities before the competition does. Moreover, they have to be efficient to do this at the right cost. Success depends on how responsive organization is to emerging events and changing environment. These events can be customer issues, competition moves, changes in regulations, or changes in company policies. In order to be responsive in such situations, organizations need to first identify and track these situations. They can do that via business activity monitoring (BAM) and complex event processing (CEP). A unified monitoring dashboard helps put together a comprehensive picture of the situation in hand and provides deep insight to take proper actions. With CEP, businesses can connect all the relevant events, detect event patterns and take immediate actions using Business Process Management system.   So to be responsive we need: Real-Time Visibility with Business Activity Monitoring You can use BAM technology to monitor progress, track performance, meet service-level agreements (SLAs), manage exceptions, and issue alerts to an employee or application when a process is not functioning properly—all in real time. A unified monitoring dashboard helps you maintain a complete picture of each situation so you can take action effectively. BAM works hand in hand with BPM software to discover the significant activities that drive business success.   Real-Time Sense and Respond An event-driven BPM solution enables each step in a business process to be informed not only by the previous step, but also by any other step, data, and pattern of behavior deemed relevant to that step. This gives the company the ability to “sense and respond.” You can describe interesting event patterns and event correlations and monitor the business in real-time. Whenever a pre-defined pattern emerges you can take actions like raising alerts, notifications, or kicking off another business process. This synergy possible by integrating activity monitoring, event processing, and BPM makes it possible for managers to keep a finger on the pulse of their business. Business managers can now respond to customers faster, respond to competition faster, reduce fraud and do more cross-selling. Read more about being responsive in the whitepaper “The Instantly Responsive Enterprise: Integrating BPM and Complex Event Processing” in BPM Resource Kit.

    Read the article

  • OpenWorld Session: BPM Analytics - Process Dashboards, BAM and Intelligent Optimization

    - by Ajay Khanna
    Blog Contributed by Payal Srivastava, Oracle Product Mamagement   Margin of error for the business is shrinking dramatically. Business needs to accomplish more with less i.e. minimal investment with quick ROI. Learn how you can leverage Oracle BPM suite and complementary technologies to create a robust analytics capability to provide visibility into operations to  C-level executives and Operational managers. We will talk about BPM analytics options available today that will not only enhance the visibility but allow you to intelligently optimize the business process at design time as well as run time.  The session will share some exciting this on our roadmap.  Come meet with the Oracle team members  from Product Development (Avinash Dabholkar , Eric Hsiao) and Product Management (Payal Srivastava) at the session. We would like to hear  your questions/comments about  our offering and roadmap. BPM Analytics: Process Dashboards, BAM and Intelligent Optimization, Moscone South 308, 10/3/12 @11:45am – CON 8598

    Read the article

  • Business Success with BPM: Customer Experiences

    - by Ajay Khanna
    Oracle OpenWorld provides a unique opportunity to listen to Oracle Business Process Management Customers. This year we have many customers including Novartis, University of Melbourne, McAfee, Nagravision, Amadeus among others speaking at various sessions. One of such session is the customer panel hosted by Manas Deb from Oracle Product Management team. In this session, you will hear your peers discuss how they have overcome technical and organizational challenges; delivered success; and brought improved efficiency, visibility, and business agility to their companies. If you are interested in hearing more about how our customers use Oracle Business Process Management Suite, join us for the following session: Business Success with BPM: Customer Experiences Monday, Oct 1, 4:45 PM - 5:45 Moscone South - 308 Oracle Business Process Management Track covers a variety of topics, and speakers covering technology, methodology and best practices. You can see the list of Business process Management sessions here. Come back to this blog for more coverage from Oracle OpenWorld!

    Read the article

  • Customer Experience and BPM – From Efficiency to Engagement

    - by Ajay Khanna
    Over the last few years, focus of BPM has been mainly to improve the businesses efficiency. To create more efficient processes, to remove bottlenecks, to automate processes. That still holds true and why not? Isn’t BPM all about continuous improvement? BPM facilitates and requires business and IT collaboration. But business also requires working with customer. Do we not want to get close to and collaborate with our customers? This is where Social BPM takes BPM a step further. It not only allows people within an organization to collaborate to design exceptional processes, not only lets them collaborate on resolving a case but also let them engage with the customers. Engaging with customer means, first of all, connecting with them on their terms and turf. Take a new account opening process. Can a customer call you and initiate the process? Can a customer email you, or go to the website and initiate the process? Can they tweet you and initiate the process? Can they check the status of process via any channel they like? Can they take a picture of damaged package delivery and kick-off a returns process from their mobile device, with GIS data? Yes, these are various aspects to consider during process design if the goal is better customer experience and engagement. Of course, we want to be efficient and agile, but the focus here needs to be the customer. Now when the customer is tweeting about your products, posting on Facebook and Yelp about their experience with your company (and your process), you need to seek out that information. You need to gather and analyze the customer’s feedback on the social media and use that information to improve the processes and products. This is an excellent source of product and process ideation. So BPM is no longer only about improving back-office process efficiency, it is moving into a new and exciting phase of improving frontline customer facing processes, customer experience and engagement. Let me know how you think BPM can enhance customer experience.

    Read the article

  • Oracle OpenWorld Session: “Business Driven Development with BPM: Lessons from the Real World”

    - by Ajay Khanna
    One of key values that BPM promises is “Business Empowerment”. People closest to the processes, who participate in the process every day, are the ones who know most about the process. These are the people who run day-to-day operations, people who triage customer issues, people who envision improvements and innovations. It is, therefore, imperative that when a company decides to use BPM technology to automate their business processes, business people take the driver’s seat. BPM is not an IT only project. Oracle BPM suite has been designed keeping this core tenet of BPM, Business Empowerment, in mind. The result is business user centered design of Process Composer. Process Composer is designed to let business users document their processes, analyze them using simulation, create web forms, specify business rules and even run them in testing mode using process player, to see if the designed process meets their needs. This does not mean that IT has no role in this process. In fact, Oracle BPM Suite has made it very easy for Business and IT to collaborate. The same process can be shared among business, and IT stakeholders and each can collaborate to create model-driven, process based executable applications. A process may need to integrate with multiple systems via various mechanisms, and IT leads system and data integration effort. IT helps fine tune the performance of process applications and ensures that the deployment of process application meets scalability and failover standards. In this session, we saw Harish Gaur and Satya Narayanan from Oracle demonstrate roles Business and IT play in BPM projects and how Oracle BPM Suite enables business and IT collaboration to design and automate process based applications. They also discussed real life customer stories. Some key takeaways from this session: There are no IT projects, only business initiatives, requiring IT support Identify high impact processes – critical, better BPM ROI Identify key metrics to measure process performance Align business with IT layer

    Read the article

  • Finding it Hard to Deliver Right Customer Experience: Think BPM!

    - by Ajay Khanna
    Our relationship with our customers is not a just a single interaction and we should not treat it like one. A customer’s relationship with a vendor is like a journey which starts way before customer makes a purchase and lasts long after that. The journey may start with customer researching a product that may lead to the eventual purchase and may continue with support or service needs for the product. A typical customer journey can be represented as shown below: As you may notice, customers tend to use multiple channels to interact with a company throughout their journey.  They also expect that they should get consistent experience, no matter what interaction channel they may choose. Customers do not like to repeat the information they have already provided and expect companies to remember their preferences, and offer them relevant products and services. If the company fails to meet this expectation, customers not only will abandon the purchase and go to the competitor but may also influence others’ purchase decision. Gone are the days when word of mouth was the only medium, and the customer could influence “Six” others. This is the age of social media and customer’s good or bad experience, especially bad get highly amplified and may influence hundreds of others. Challenges that face B2C companies today include: Delivering consistent experience: The reason that delivering consistent experience is challenging is due to fragmented data, disjointed systems and siloed multichannel interactions. Customers tend to get different service quality if they use web vs. phone vs. store. They get different responses from different service agents or get inconsistent answers if they call sales vs. service group in the company. Such inconsistent experiences result in lower customer satisfaction or NPS (net promoter score) numbers. Increasing Revenue: To stay competitive companies frequently introduce new products and services. Delay in launching such offerings has a significant impact on revenue realization. In addition to new product revenue, there are multiple opportunities to up-sell and cross-sell that impact bottom line. If companies are not able to identify such opportunities, bring a product to market quickly, or not offer the right product to the right customer at the right time, significant loss of revenue may occur. Ensuring Compliance: Companies must be compliant to ever changing regulations, these could be about Know Your Customer (KYC), Export/Import regulations, or taxation policies. In addition to government agencies, companies also need to comply with the SLA that they have committed to their customers. Lapse in meeting any of these requirements may lead to serious fines, penalties and loss in business. Companies have to make sure that they are in compliance will all such regulations and SLA commitments, at any given time. With the advent of social networks and mobile technology, companies not only need to focus on process efficiency but also on customer engagement. Improving engagement means delivering the customer experience as the customer is expecting and interacting with the customer at right time using right channel. Customers expect to be able to contact you via any channel of their choice (web, email, chat, mobile, social media), purchase via any viable channel (web, phone, store, mobile). Customers expect companies to understand their particular needs and remember their preferences on repeated visits. To deliver such an integrated, consistent, and contextual experience, power of BPM in must. Your company may be organized in departments like Marketing, Sales, Service. You may hold prospect data in SFA, order information in ERP, customer issues in CRM. However, the experience delivered to the customer must not be constrained by your system legacy. BPM helps in designing the right experience for the right customer and integrates all the underlining channels, systems, applications to make sure right information will be delivered to the right knowledge worker or to the customer every single time.     Orchestrating information across all systems (MDM, CRM, ERP), departments (commerce, merchandising, marketing service) and channels (Email, phone, web, social)  is the key, and that’s what BPM delivers. In addition to orchestrating systems and channels for consistency, BPM also provides an ability for analysis and decision management. By using data from historical transactions, social media and from other systems, users can determine the customer preferences, customer value, and churn propensity. This information, in the context, is then used while making a decision at a process step. Working with real-time decision management system can also suggest right up-sell or cross-sell offers, discounts or next-best-action steps for a particular customer. Timely action on customer issues or request is also a key tenet of a good customer experience. BPM’s complex event processing capabilities help companies to take proactive actions before issues get escalated. BPM system can be designed to listen to a certain event patters then deduce from those customer situations (credit card stolen, baggage lost, change of address) and do a triage before situation goes out of control. If such a situation arises you can send alerts to right people or immediately invoke corrective actions. Last but not least one of BPM’s key values is to drive continuous improvement. Learning about customers past experiences, interactions and social conversations, provide valuable insight. Such insight can be used to improve products, customer facing processes, and customer experience. You may take these insights as an input to design better more efficient and customer friendly sales, contact center or self-service processes. If customer experience is important for your business, make sure you have incorporated BPM as a part of your strategy to design, orchestrate and improve your customer facing processes.

    Read the article

  • Get aspect ratio of a monitor

    - by Alexander Stalt
    I want to get aspect ratio of a monitor as two digits : width and height. For example 4 and 3, 5 and 4, 16 and 9. I wrote some code for that task. Maybe it is any easier way to do that ? For example, some library function =\ /// <summary> /// Aspect ratio. /// </summary> public struct AspectRatio { int _height; /// <summary> /// Height. /// </summary> public int Height { get { return _height; } } int _width; /// <summary> /// Width. /// </summary> public int Width { get { return _width; } } /// <summary> /// Ctor. /// </summary> /// <param name="height">Height of aspect ratio.</param> /// <param name="width">Width of aspect ratio.</param> public AspectRatio(int height, int width) { _height = height; _width = width; } } public sealed class Aux { /// <summary> /// Get aspect ratio. /// </summary> /// <returns>Aspect ratio.</returns> public static AspectRatio GetAspectRatio() { int deskHeight = Screen.PrimaryScreen.Bounds.Height; int deskWidth = Screen.PrimaryScreen.Bounds.Width; int gcd = GCD(deskWidth, deskHeight); return new AspectRatio(deskHeight / gcd, deskWidth / gcd); } /// <summary> /// Greatest Common Denominator (GCD). Euclidean algorithm. /// </summary> /// <param name="a">Width.</param> /// <param name="b">Height.</param> /// <returns>GCD.</returns> static int GCD(int a, int b) { return b == 0 ? a : GCD(b, a % b); } }

    Read the article

  • Clean URLs mod_rewrite & wildcard subdomains

    - by Søren Zet
    I got this url http://domain.com/blogs/directory-param with this rule RewriteBase /blogs/directory/ RewriteRule ^/blogs/directory-([A-Za-z0-9-]+)$ /blogs/directory/index.php?cat=$1 [L] so I get /blogs/directory/index.php?cat=param now my problem is the following: I use wildcards subdomains so every *.domain.com is mapped to domain.com/blogs/ for example soeren.domain.com is mapped to domain.com/blogs and so on... My problem now is I want a rule for soeren.domain.com/directory-param which points to domain.com/blogs/directory?index.php?cat=param Do you have any ideas?

    Read the article

  • How to split xml to header and items using smooks?

    - by palto
    I have a xml file roughly like this: <batch> <header> <headerStuff /> </header> <contents> <timestamp /> <invoices> <invoice> <invoiceStuff /> </invoice> <!-- Insert 1000 invoice elements here --> </invoices> </contents> </batch> I would like to split that file to 1000 files with the same headerStuff and only one invoice. Smooks documentation is very proud of the possibilities of transformations, but unfortunately I don't want to do those. The only way I've figured how to do this is to repeat the whole structure in freemarker. But that feels like repeating the structure unnecessarily. The header has like 30 different tags so there would be lots of work involved also. What I currently have is this: <?xml version="1.0" encoding="UTF-8"?> <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:calc="http://www.milyn.org/xsd/smooks/calc-1.1.xsd" xmlns:frag="http://www.milyn.org/xsd/smooks/fragment-routing-1.2.xsd" xmlns:file="http://www.milyn.org/xsd/smooks/file-routing-1.1.xsd"> <params> <param name="stream.filter.type">SAX</param> </params> <frag:serialize fragment="INVOICE" bindTo="invoiceBean" /> <calc:counter countOnElement="INVOICE" beanId="split_calc" start="1" /> <file:outputStream openOnElement="INVOICE" resourceName="invoiceSplitStream"> <file:fileNamePattern>invoice-${split_calc}.xml</file:fileNamePattern> <file:destinationDirectoryPattern>target/invoices</file:destinationDirectoryPattern> <file:highWaterMark mark="10"/> </file:outputStream> <resource-config selector="INVOICE"> <resource>org.milyn.routing.io.OutputStreamRouter</resource> <param name="beanId">invoiceBean</param> <param name="resourceName">invoiceSplitStream</param> <param name="visitAfter">true</param> </resource-config> </smooks-resource-list> That creates files for each invoice tag, but I don't know how to continue from there to get the header also in the file. EDIT: The solution has to use Smooks. We use it in an application as a generic splitter and just create different smooks configuration files for different types of input files.

    Read the article

  • Logic for FOR loop in c#

    - by karthik
    My method has a parameter, I have to use that in my For loop to iterate. For example, I have a text file with 4 lines. If the Param is 1, the for loop must iterate through the last three lines If the Param is 2, the for loop must iterate through the last two lines If the Param is 3, the for loop must iterate through the last one line How can i pass this param in my For loop to achieve all the three scenarios stated above ?

    Read the article

  • sed as grep + ignore # and match

    - by yael
    I have the following file example more somefile param=a b c d e f g z x w # param=a b c d e f g z x w I need to create with sed the following (should be one line if possible): Ignore # char in the beginning of line Match first the param string Second match the "a b c d e f g z x w" (like grep -w) and give exit status if success Something like .... sed "/^ *#/b; /\<param\>/" ....

    Read the article

  • Local variable vs parameter

    - by Dhana
    function doIt(param) { var localVar = param; //do lots of stuff with localVar } function doIt(param) { //do lots of stuff with param } Is there any difference in terms of efficiency between the code above?

    Read the article

  • Debugging PHP Mail() and/or PHPMailer

    - by Agos
    Hi, I'm quite stuck with a problem sending mail from a PHP script. Some data: Shared hosting, no SSH access, only hosting provider panel PHP version 5.2.5 Last year I built a site which had no problems sending mail with the same hosting Let's say the domain is “domain.com” and my private address is “[email protected]” for anonimity's sake in the following code. Here's the code: <?php error_reporting(E_ALL); ini_set("display_errors", 1); $to = "[email protected]"; $subject = "Hi"; $body = "Test 1\nTest 2\nTest 3"; $headers = 'From: [email protected]' . "\r\n" . 'errors-to: [email protected]' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if (mail($to, $subject, $body, $headers)) { echo("Message successfully sent"); } else { echo("Message sending failed"); } require('class.phpmailer.php'); $message = "Hello world"; $mail = new PHPMailer(); $mail->CharSet = "UTF-8"; $mail->AddAddress("[email protected]", "Agos"); $mail->SetFrom("[email protected]","My Site"); $mail->Subject = "Test Message"; $mail->Body = $message; $mail->Send(); ?> And here is what I get: Message sending failed 'ai' = 'application/postscript', 'eps' = 'application/postscript', 'ps' = 'application/postscript', 'smi' = 'application/smil', 'smil' = 'application/smil', 'mif' = 'application/vnd.mif', 'xls' = 'application/vnd.ms-excel', 'ppt' = 'application/vnd.ms-powerpoint', 'wbxml' = 'application/vnd.wap.wbxml', 'wmlc' = 'application/vnd.wap.wmlc', 'dcr' = 'application/x-director', 'dir' = 'application/x-director', 'dxr' = 'application/x-director', 'dvi' = 'application/x-dvi', 'gtar' = 'application/x-gtar', 'php' = 'application/x-httpd-php', 'php4' = 'application/x-httpd-php', 'php3' = 'application/x-httpd-php', 'phtml' = 'application/x-httpd-php', 'phps' = 'application/x-httpd-php-source', 'js' = 'application/x-javascript', 'swf' = 'application/x-shockwave-flash', 'sit' = 'application/x-stuffit', 'tar' = 'application/x-tar', 'tgz' = 'application/x-tar', 'xhtml' = 'application/xhtml+xml', 'xht' = 'application/xhtml+xml', 'zip' = 'application/zip', 'mid' = 'audio/midi', 'midi' = 'audio/midi', 'mpga' = 'audio/mpeg', 'mp2' = 'audio/mpeg', 'mp3' = 'audio/mpeg', 'aif' = 'audio/x-aiff', 'aiff' = 'audio/x-aiff', 'aifc' = 'audio/x-aiff', 'ram' = 'audio/x-pn-realaudio', 'rm' = 'audio/x-pn-realaudio', 'rpm' = 'audio/x-pn-realaudio-plugin', 'ra' = 'audio/x-realaudio', 'rv' = 'video/vnd.rn-realvideo', 'wav' = 'audio/x-wav', 'bmp' = 'image/bmp', 'gif' = 'image/gif', 'jpeg' = 'image/jpeg', 'jpg' = 'image/jpeg', 'jpe' = 'image/jpeg', 'png' = 'image/png', 'tiff' = 'image/tiff', 'tif' = 'image/tiff', 'css' = 'text/css', 'html' = 'text/html', 'htm' = 'text/html', 'shtml' = 'text/html', 'txt' = 'text/plain', 'text' = 'text/plain', 'log' = 'text/plain', 'rtx' = 'text/richtext', 'rtf' = 'text/rtf', 'xml' = 'text/xml', 'xsl' = 'text/xml', 'mpeg' = 'video/mpeg', 'mpg' = 'video/mpeg', 'mpe' = 'video/mpeg', 'qt' = 'video/quicktime', 'mov' = 'video/quicktime', 'avi' = 'video/x-msvideo', 'movie' = 'video/x-sgi-movie', 'doc' = 'application/msword', 'word' = 'application/msword', 'xl' = 'application/excel', 'eml' = 'message/rfc822' ); return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; } /** * Set (or reset) Class Objects (variables) * * Usage Example: * $page-set('X-Priority', '3'); * * @access public * @param string $name Parameter Name * @param mixed $value Parameter Value * NOTE: will not work with arrays, there are no arrays to set/reset * @todo Should this not be using __set() magic function? */ public function set($name, $value = '') { try { if (isset($this-$name) ) { $this-$name = $value; } else { throw new phpmailerException($this-Lang('variable_set') . $name, self::STOP_CRITICAL); } } catch (Exception $e) { $this-SetError($e-getMessage()); if ($e-getCode() == self::STOP_CRITICAL) { return false; } } return true; } /** * Strips newlines to prevent header injection. * @access public * @param string $str String * @return string */ public function SecureHeader($str) { $str = str_replace("\r", '', $str); $str = str_replace("\n", '', $str); return trim($str); } /** * Set the private key file and password to sign the message. * * @access public * @param string $key_filename Parameter File Name * @param string $key_pass Password for private key */ public function Sign($cert_filename, $key_filename, $key_pass) { $this-sign_cert_file = $cert_filename; $this-sign_key_file = $key_filename; $this-sign_key_pass = $key_pass; } /** * Set the private key file and password to sign the message. * * @access public * @param string $key_filename Parameter File Name * @param string $key_pass Password for private key */ public function DKIM_QP($txt) { $tmp=""; $line=""; for ($i=0;$i<= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) { $line.=$txt[$i]; } else { $line.="=".sprintf("%02X",$ord); } } return $line; } /** * Generate DKIM signature * * @access public * @param string $s Header */ public function DKIM_Sign($s) { $privKeyStr = file_get_contents($this-DKIM_private); if ($this-DKIM_passphrase!='') { $privKey = openssl_pkey_get_private($privKeyStr,$this-DKIM_passphrase); } else { $privKey = $privKeyStr; } if (openssl_sign($s, $signature, $privKey)) { return base64_encode($signature); } } /** * Generate DKIM Canonicalization Header * * @access public * @param string $s Header */ public function DKIM_HeaderC($s) { $s=preg_replace("/\r\n\s+/"," ",$s); $lines=explode("\r\n",$s); foreach ($lines as $key=$line) { list($heading,$value)=explode(":",$line,2); $heading=strtolower($heading); $value=preg_replace("/\s+/"," ",$value) ; // Compress useless spaces $lines[$key]=$heading.":".trim($value) ; // Don't forget to remove WSP around the value } $s=implode("\r\n",$lines); return $s; } /** * Generate DKIM Canonicalization Body * * @access public * @param string $body Message Body */ public function DKIM_BodyC($body) { if ($body == '') return "\r\n"; // stabilize line endings $body=str_replace("\r\n","\n",$body); $body=str_replace("\n","\r\n",$body); // END stabilize line endings while (substr($body,strlen($body)-4,4) == "\r\n\r\n") { $body=substr($body,0,strlen($body)-2); } return $body; } /** * Create the DKIM header, body, as new header * * @access public * @param string $headers_line Header lines * @param string $subject Subject * @param string $body Body */ public function DKIM_Add($headers_line,$subject,$body) { $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body $DKIMquery = 'dns/txt'; // Query method $DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) $subject_header = "Subject: $subject"; $headers = explode("\r\n",$headers_line); foreach($headers as $header) { if (strpos($header,'From:') === 0) { $from_header=$header; } elseif (strpos($header,'To:') === 0) { $to_header=$header; } } $from = str_replace('|','=7C',$this-DKIM_QP($from_header)); $to = str_replace('|','=7C',$this-DKIM_QP($to_header)); $subject = str_replace('|','=7C',$this-DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable $body = $this-DKIM_BodyC($body); $DKIMlen = strlen($body) ; // Length of body $DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body $ident = ($this-DKIM_identity == '')? '' : " i=" . $this-DKIM_identity . ";"; $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this-DKIM_selector . ";\r\n". "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n". "\th=From:To:Subject;\r\n". "\td=" . $this-DKIM_domain . ";" . $ident . "\r\n". "\tz=$from\r\n". "\t|$to\r\n". "\t|$subject;\r\n". "\tbh=" . $DKIMb64 . ";\r\n". "\tb="; $toSign = $this-DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs); $signed = $this-DKIM_Sign($toSign); return "X-PHPMAILER-DKIM: phpmailer.worxware.com\r\n".$dkimhdrs.$signed."\r\n"; } protected function doCallback($isSent,$to,$cc,$bcc,$subject,$body) { if (!empty($this-action_function) && function_exists($this-action_function)) { $params = array($isSent,$to,$cc,$bcc,$subject,$body); call_user_func_array($this-action_function,$params); } } } class phpmailerException extends Exception { public function errorMessage() { $errorMsg = '' . $this-getMessage() . " \n"; return $errorMsg; } } ? Fatal error: Class 'PHPMailer' not found in /mailtest.php on line 20 Which is baffling to say the least. Is there anything I can do to get at least some more meaningful errors? Why is code from the class showing up in my file?

    Read the article

  • How to have other divs with a flash liquid layout that fits to the page?

    - by brybam
    Basically the majority of my content is flash based. I designed it using Flash Builder (Flex) and Its in a liquid layout, (everything is in percents) and if im JUST embedding the flash content it scales to the page fine, and i have the flash content set to have a padding of 50 px. I put a header div in fine with no problems, but I have 2 problems, the first being the footer div seems to cover up the buttom of the flash content in IE, but it looks just fine in chrome. How can I solve this? I'm using the stock embed code that Flex provides, I tried to edit the css style for the div which I think is #flashContent and give it a min width and min height but it didnt seem to work, actually anything I did to #flashContent didn't seem to do anything, maybe its not the div i need to be adding that attribute to... And my other problem is I dont even know where to start when it comes to placing a div thats 280width by 600height colum to the right side of the flash content. If i could specify a size for the flash content, and the float it left, and float the colum right, and clear it with the container div id be just fine....But remember the flash content is set to 100% Scale (well techically 100%x80% because it looked better that way). Does anyone know how I can start to deal with creating a more complex scaleable flash layouts that includes other divs? ALL WELL MAINTAINING IE SUPPORT? IE is ruining my life. Here's the code I'm using: (or if it will help you visualize what im trying to do here's the page where im working on setting this up http://apumpkinpatch.com/textmashnew/) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>TextMixup</title> <meta name="google" value="notranslate"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css.css" rel="stylesheet" type="text/css" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> <script src="../appassets/scripts/jquery.titlealert.js"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-19768131-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function tabNotification() { $.titleAlert('New Message!', {interval:200,requireBlur:true,stopOnFocus:true}); } function joinNotification() { $.titleAlert('Joined Chat!', {interval:200,requireBlur:true,stopOnFocus:true}); } </script> <!-- BEGIN Browser History required section --> <link rel="stylesheet" type="text/css" href="history/history.css" /> <script type="text/javascript" src="history/history.js"></script> <!-- END Browser History required section --> <script type="text/javascript" src="swfobject.js"></script> <script type="text/javascript"> var swfVersionStr = "10.2.0"; var xiSwfUrlStr = "playerProductInstall.swf"; var flashvars = {}; var params = {}; params.quality = "high"; params.bgcolor = "#ffffff"; params.allowscriptaccess = "sameDomain"; params.allowfullscreen = "true"; var attributes = {}; attributes.id = "TextMixup"; attributes.name = "TextMixup"; attributes.align = "middle"; swfobject.embedSWF( "TextMixup.swf", "flashContent", "100%", "80%", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes); swfobject.createCSS("#flashContent", "display:block;text-align:left;"); </script> </head> <body> <div id="homebar"><a href="http://apumpkinpatch.com"><img src="../appassets/images/logo/logoHor_130_30.png" alt="APumpkinPatch HOME" width="130" height="30" hspace="10" vspace="3" border="0"/></a> </div> <div id="topad"> <script type="text/javascript"><!-- google_ad_client = "pub-5824388356626461"; /* 728x90, textmash */ google_ad_slot = "1114351240"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> <div id="mainContainer"> <div id="flashContent"> <p> To view this page ensure that Adobe Flash Player version 10.2.0 or greater is installed. </p> <script type="text/javascript"> var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); </script> </div> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="80%" id="TextMixup"> <param name="movie" value="TextMixup.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="TextMixup.swf" width="100%" height="80%"> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <!--<![endif]--> <!--[if gte IE 6]>--> <p> Either scripts and active content are not permitted to run or Adobe Flash Player version 10.2.0 or greater is not installed. </p> <!--<![endif]--> <a href="http://www.adobe.com/go/getflashplayer"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </noscript> <div id="convosPreview">This is a div I would want to appear as a colum to the right of the flash content that can scale</div> <!---End mainContainer --> </div> <div id="footer"> <a href="../apps.html"><img src="../appassets/images/apps.png" hspace="5" vspace="5" alt="random chat app apumpkinpatch" width="228" height="40" border="0" /></a><a href="https://chrome.google.com/webstore/detail/hjmnobclpbhnjcpdnpdnkbgdkbfifbao?hl=en-US#"><img src="../appassets/images/chromeapp.png" alt="chrome app random video chat apumpkinpatch" width="115" height="40" vspace="5" border="0" /></a><br /><br /> <a href="http://spacebarup.com" target="_blank">©2011 Space Bar</a> | <a href="../tos.html">TOS & Privacy Policy</a> | <a href="../help.html">FAQ & Help</a> | <a href="../tips.html">Important online safety tips</a> | <a href="http://www.facebook.com/pages/APumpkinPatchcom/164279206963001?sk=app_2373072738" target="_blank">Discussion Boards</a><br /> <p>You must be at least 18 years of age to access this web site.<br />APumpkinPatch.com is not responsible for the actions of any visitors of this site.<br />APumpkinPatch.com does not endorse or claim ownership to any of the content that is broadcast through this site. </p><h2>A Pumpkin Patch is BRAND NEW and will be developed a lot over the next few months adding video chat games, chat rooms, and more! Check back often it's going to be a lot of fun!</h2> </div> </body> </html> myCSS: html, body { height:100%; } body { text-align:center; font-family: Helvetica, Arial, sans-serif; margin:0; padding:0; overflow:auto; text-align:center; background-color: #ffffff; } object:focus { outline:none; } #homebar { clear:both; text-align: left; width: 100%; height: 40px; background-color:#333333; color:#CCC; overflow:hidden; box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.65); -moz-box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.65); -webkit-box-shadow: 0px 0px 14px rgba(0, 0, 0, 0.65); margin-bottom: 10px; } #mainContainer { height:auto; width:auto; clear:both; } #flashContent { display:none; height:auto; float:left; min-height: 500px; min-width: 340px; } /**this is the div i want to appear as a column net to the scaleable flash content **/ #convosPreview { float:right; width:280px; height:600px; }

    Read the article

  • Monitoring Html Element CSS Changes in JavaScript

    - by Rick Strahl
    [ updated Feb 15, 2011: Added event unbinding to avoid unintended recursion ] Here's a scenario I've run into on a few occasions: I need to be able to monitor certain CSS properties on an HTML element and know when that CSS element changes. For example, I have a some HTML element behavior plugins like a drop shadow that attaches to any HTML element, but I then need to be able to automatically keep the shadow in sync with the window if the  element dragged around the window or moved via code. Unfortunately there's no move event for HTML elements so you can't tell when it's location changes. So I've been looking around for some way to keep track of the element and a specific CSS property, but no luck. I suspect there's nothing native to do this so the only way I could think of is to use a timer and poll rather frequently for the property. I ended up with a generic jQuery plugin that looks like this: (function($){ $.fn.watch = function (props, func, interval, id) { /// <summary> /// Allows you to monitor changes in a specific /// CSS property of an element by polling the value. /// when the value changes a function is called. /// The function called is called in the context /// of the selected element (ie. this) /// </summary> /// <param name="prop" type="String">CSS Properties to watch sep. by commas</param> /// <param name="func" type="Function"> /// Function called when the value has changed. /// </param> /// <param name="interval" type="Number"> /// Optional interval for browsers that don't support DOMAttrModified or propertychange events. /// Determines the interval used for setInterval calls. /// </param> /// <param name="id" type="String">A unique ID that identifies this watch instance on this element</param> /// <returns type="jQuery" /> if (!interval) interval = 200; if (!id) id = "_watcher"; return this.each(function () { var _t = this; var el$ = $(this); var fnc = function () { __watcher.call(_t, id) }; var itId = null; var data = { id: id, props: props.split(","), func: func, vals: [props.split(",").length], fnc: fnc, origProps: props, interval: interval }; $.each(data.props, function (i) { data.vals[i] = el$.css(data.props[i]); }); el$.data(id, data); hookChange(el$, id, data.fnc); }); function hookChange(el$, id, fnc) { el$.each(function () { var el = $(this); if (typeof (el.get(0).onpropertychange) == "object") el.bind("propertychange." + id, fnc); else if ($.browser.mozilla) el.bind("DOMAttrModified." + id, fnc); else itId = setInterval(fnc, interval); }); } function __watcher(id) { var el$ = $(this); var w = el$.data(id); if (!w) return; var _t = this; if (!w.func) return; // must unbind or else unwanted recursion may occur el$.unwatch(id); var changed = false; var i = 0; for (i; i < w.props.length; i++) { var newVal = el$.css(w.props[i]); if (w.vals[i] != newVal) { w.vals[i] = newVal; changed = true; break; } } if (changed) w.func.call(_t, w, i); // rebind event hookChange(el$, id, w.fnc); } } $.fn.unwatch = function (id) { this.each(function () { var el = $(this); var fnc = el.data(id).fnc; try { if (typeof (this.onpropertychange) == "object") el.unbind("propertychange." + id, fnc); else if ($.browser.mozilla) el.unbind("DOMAttrModified." + id, fnc); else clearInterval(id); } // ignore if element was already unbound catch (e) { } }); return this; } })(jQuery); With this I can now monitor movement by monitoring say the top CSS property of the element. The following code creates a box and uses the draggable (jquery.ui) plugin and a couple of custom plugins that center and create a shadow. Here's how I can set this up with the watcher: $("#box") .draggable() .centerInClient() .shadow() .watch("top", function() { $(this).shadow(); },70,"_shadow"); ... $("#box") .unwatch("_shadow") .shadow("remove"); This code basically sets up the window to be draggable and initially centered and then a shadow is added. The .watch() call then assigns a CSS property to monitor (top in this case) and a function to call in response. The component now sets up a setInterval call and keeps on pinging this property every time. When the top value changes the supplied function is called. While this works and I can now drag my window around with the shadow following suit it's not perfect by a long shot. The shadow move is delayed and so drags behind the window, but using a higher timer value is not appropriate either as the UI starts getting jumpy if the timer's set with too small of an increment. This sort of monitor can be useful for other things as well where operations are maybe not quite as time critical as a UI operation taking place. Can anybody see a better a better way of capturing movement of an element on the page?© Rick Strahl, West Wind Technologies, 2005-2011Posted in ASP.NET  JavaScript  jQuery  

    Read the article

  • ASP.NET AJAX Problem

    - by Rich Andrews
    I've updated some code to use the Ajax Control toolkit 0911 beta and for some reason code that dynamically added collapsable panel extenders in the code behind now causes the following error in the client side jscript... Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element in... $create = Sys.Component.create = function Sys$Component$create(type, properties, events, references, element) { /// <summary locid="M:J#Sys.Component.create" /> /// <param name="type" type="Type"></param> /// <param name="properties" optional="true" mayBeNull="true"></param> /// <param name="events" optional="true" mayBeNull="true"></param> /// <param name="references" optional="true" mayBeNull="true"></param> /// <param name="element" domElement="true" optional="true" mayBeNull="true"></param> /// <returns type="Object"></returns> var e = Function._validateParams(arguments, [ {name: "type", type: Type}, {name: "properties", mayBeNull: true, optional: true}, {name: "events", mayBeNull: true, optional: true}, {name: "references", mayBeNull: true, optional: true}, {name: "element", mayBeNull: true, domElement: true, optional: true} ]); if (e) throw e; if (type.inheritsFrom(Sys.UI.Behavior) || type.inheritsFrom(Sys.UI.Control)) { if (!element) throw Error.argument('element', Sys.Res.createNoDom); } I accept that this is only a beta but I'm unable to either find a work around or even understand the reason why this pretty simple code no longer works. Code private Panel GetReportPanel(DataRow dr, ReportParameter[] Params) { Panel pnlReport = new Panel(); pnlReport.ID = Uri.EscapeDataString(dr["ReportName"].ToString()) + "_MainReportContainer"; //Report Title Section var pnlReportTitle = new Panel(); pnlReportTitle.CssClass = "ReportSectionTitle"; var tblReportTitle = new Table(); var trowReportTitle = new TableRow(); var tcellReportTitle = new TableCell(); var imgReportTitleExpand = new Image(); imgReportTitleExpand.ID = Uri.EscapeDataString("img" + dr["ReportName"].ToString() + "DataExpand"); tcellReportTitle.Controls.Add(imgReportTitleExpand); trowReportTitle.Controls.Add(tcellReportTitle); tcellReportTitle = new TableCell(); var lblReportTitle = new Label(); lblReportTitle.ID = Uri.EscapeDataString("lnk" + dr["ReportName"].ToString()); lblReportTitle.Text = "Functional " + dr["ReportName"].ToString(); tcellReportTitle.Controls.Add(lblReportTitle); trowReportTitle.Controls.Add(tcellReportTitle); tblReportTitle.Controls.Add(trowReportTitle); pnlReportTitle.Controls.Add(tblReportTitle); pnlReport.Controls.Add(pnlReportTitle); //Report Section var pnlReportSection = new Panel(); pnlReportSection.ID = Uri.EscapeDataString("pnlReportSection" + dr["ReportName"].ToString()); pnlReportSection.CssClass = "ReportSection"; pnlReportSection.ScrollBars = ScrollBars.None; var pnlInnerReportSection = new Panel(); pnlInnerReportSection.CssClass = "ReportSection"; var rptControl = new ReportViewer(); rptControl.ID = "rpt" + dr["ReportName"].ToString().Replace(' ', '_'); rptControl.ProcessingMode = ProcessingMode.Remote; rptControl.Width = new Unit("100%"); rptControl.ShowDocumentMapButton = false; rptControl.ShowParameterPrompts = false; rptControl.Visible = true; rptControl.Height = new Unit("500px"); rptControl.AsyncRendering = (bool)dr["ASyncRenderingEnabled"]; rptControl.ServerReport.ReportPath = dr["SSRSReportPath"].ToString(); rptControl.ServerReport.ReportServerUrl = new Uri("http://horoap336/reportserver"); rptControl.ServerReport.SetParameters(Params); pnlInnerReportSection.Controls.Add(rptControl); pnlReportSection.Controls.Add(pnlInnerReportSection); pnlReport.Controls.Add(pnlReportSection); //Collapsable Panel Extender var Extender = new AjaxControlToolkit.CollapsiblePanelExtender(); Extender.TargetControlID = pnlReportSection.ID; Extender.ID = Uri.EscapeDataString(dr["ReportName"].ToString()) + "_Extender"; Extender.CollapsedSize = 0; Extender.Collapsed = true; Extender.ExpandControlID = lblReportTitle.ID; Extender.CollapseControlID = lblReportTitle.ID; Extender.AutoCollapse = false; Extender.AutoExpand = false; Extender.ScrollContents = false; Extender.TextLabelID = lblReportTitle.ID; Extender.CollapsedText = "Functional " + dr["ReportName"].ToString() + " (Click To Show Details...)"; Extender.ExpandedText = "Functional " + dr["ReportName"].ToString() + " (Click To Hide Details...)"; Extender.ImageControlID = imgReportTitleExpand.ID; Extender.ExpandedImage = "~/images/collapse.jpg"; Extender.CollapsedImage = "~/images/expand.jpg"; Extender.ExpandDirection = AjaxControlToolkit.CollapsiblePanelExpandDirection.Vertical; pnlReport.Controls.Add(Extender); return pnlReport; } This panel is then added to a panel in the aspx file using... pnlContainer.Controls.Add(GetReportPanel(dr,Params)); Aspx file... <%@ Page Title="Operations MI Dashboard - Functional Reporting" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="FunctionalReport.aspx.cs" Inherits="TelephonyReport" %> <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Panel ID="pnlContainer" runat="server"> </asp:Panel> </asp:Content> So, my questions are: Is there a problem with my code that is only evident in the later version of the toolkit? Does anyone know of a workaround that I can try? Can anyone explain why this problem happens only in the latest version?

    Read the article

  • Problem with a test method in Yii web services

    - by Conrad
    Hi There, Is there anyone here who might be familiar with web services in the yii framework? I declared the following test method: /** * Send a single SMS message * * @param string $username Username * @param string $password Password * @param string $identifier Valid Identifier to use * @param string $mobileNumber Mobile Number to send message to * @param string $message Message to send * @return string 'OK' on success, error message on failure * @soap */ public function singleSms($username, $password, $identifier,$mobileNumber, $message){ return "username=$username, pwd=$password, source=$identifier, mobno=$mobileNumber, msg=$message"; } But when I try to call this method I get the following response: - - WSDL - SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sms.chillnethosting.co.za/index.php?r=sms/webservice' : Start tag expected, '<' not found The WSDL generates when I call my URL: Web Service URL Any Ideas?

    Read the article

  • Configuring Rolling File Appender

    - by Anand
    Hi, My jboss application server log file named jboss-log4j.xml has the following configuration for the rolling file appender <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="${jboss.server.log.dir}/server.log"/> <param name="Append" value="false"/> <param name="MaxFileSize" value="500KB"/> <param name="MaxBackupIndex" value="1"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> </layout> </appender> What does this exactly do ? How should I set it to do either of the two things ? 1. Delete logs older than 5 days or 2. Delete logs when they exceed 800MB, so that once they are deleted the new logs can take effect

    Read the article

  • XmlSchemaElement type

    - by user305287
    Hi, I'm generating WSDL of my web service dynamically, but when I set the XmlSchemaType of my elements, the ServiceDescriptor writes the element as an element rather than message, as I need. The code looks like this: XmlSchemaElement schemaElement = new XmlSchemaElement(); XmlSchemaComplexType complexType = new XmlSchemaComplexType(); XmlSchemaSequence sequence = new XmlSchemaSequence(); foreach (XmlSchemaComplexElementParameter param in element.Parameters) { XmlSchemaElement paramElement = new XmlSchemaElement(); paramElement.Name = param.ParameterName; paramElement.SchemaTypeName = new XmlQualifiedName(param.ParameterType, "http://www.w3.org/2001/XMLSchema"); paramElement.MaxOccurs = param.MaxOccurs; paramElement.MinOccurs = param.MinOccurs; sequence.Items.Add(paramElement); } complexType.Particle = sequence; schemaElement.Name = element.MessageName; schemaElement.SchemaType = complexType; Any ideas about this?

    Read the article

  • I need help with Widget and PendingIntents

    - by YaW
    Hi, I've asked here a question about Task Killers and widgets stop working (SO Question) but now, I have reports of user that they don't use any Task Killer and the widgets didn't work after a while. I have a Nexus One and I don't have this problem. I don't know if this is a problem of memory or something. Based on the API: A PendingIntent itself is simply a reference to a token maintained by the system describing the original data used to retrieve it. This means that, even if its owning application's process is killed, the PendingIntent itself will remain usable from other processes that have been given it. So, I don't know why widget stop working, if Android doesn't kill the PendingIntent by itself, what's the problem? This is my manifest code: <receiver android:name=".widget.InstantWidget" android:label="@string/app_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_provider" /> </receiver> And the widget code: public class InstantWidget extends AppWidgetProvider { public static ArrayList<Integer> alWidgetsId = new ArrayList<Integer>(); private static final String PREFS_NAME = "com.cremagames.instant.InstantWidget"; private static final String PREF_PREFIX_NOM = "nom_"; private static final String PREF_PREFIX_RAW = "raw_"; /** * Esto se llama cuando se crea el widget. Metemos en las preferencias los valores de nombre y raw para tenerlos en proximos reboot. * @param context * @param appWidgetManager * @param appWidgetId * @param nombreSound * @param rawSound */ static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId, String nombreSound, int rawSound){ //Guardamos en las prefs los valores SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit(); prefs.putString(PREF_PREFIX_NOM + appWidgetId, nombreSound); prefs.putInt(PREF_PREFIX_RAW + appWidgetId, rawSound); prefs.commit(); //Actualizamos la interfaz updateWidgetGrafico(context, appWidgetManager, appWidgetId, nombreSound, rawSound); } /** * Actualiza la interfaz gráfica del widget (pone el nombre y crea el intent con el raw) * @param context * @param appWidgetManager * @param appWidgetId * @param nombreSound * @param rawSound */ private static void updateWidgetGrafico(Context context, AppWidgetManager appWidgetManager, int appWidgetId, String nombreSound, int rawSound){ RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget); //Nombre del Button remoteViews.setTextViewText(R.id.tvWidget, nombreSound); //Creamos el PendingIntent para el onclik del boton Intent active = new Intent(context, InstantWidget.class); active.setAction(String.valueOf(appWidgetId)); active.putExtra("sonido", rawSound); PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0, active, 0); actionPendingIntent.cancel(); actionPendingIntent = PendingIntent.getBroadcast(context, 0, active, 0); remoteViews.setOnClickPendingIntent(R.id.btWidget, actionPendingIntent); appWidgetManager.updateAppWidget(appWidgetId, remoteViews); } public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); //Esto se usa en la 1.5 para que se borre bien el widget if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { final int appWidgetId = intent.getExtras().getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) { this.onDeleted(context, new int[] { appWidgetId }); } } else { //Listener de los botones for(int i=0; i<alWidgetsId.size(); i++){ if (intent.getAction().equals(String.valueOf(alWidgetsId.get(i)))) { int sonidoRaw = 0; try { sonidoRaw = intent.getIntExtra("sonido", 0); } catch (NullPointerException e) { } MediaPlayer mp = MediaPlayer.create(context, sonidoRaw); mp.start(); mp.setOnCompletionListener(completionListener); } } super.onReceive(context, intent); } } /** Al borrar el widget, borramos también las preferencias **/ public void onDeleted(Context context, int[] appWidgetIds) { for(int i=0; i<appWidgetIds.length; i++){ //Recogemos las preferencias SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit(); prefs.remove(PREF_PREFIX_NOM + appWidgetIds[i]); prefs.remove(PREF_PREFIX_RAW + appWidgetIds[i]); prefs.commit(); } super.onDeleted(context, appWidgetIds); } /**Este método se llama cada vez que se refresca un widget. En nuestro caso, al crearse y al reboot del telefono. Al crearse lo único que hace es guardar el id en el arrayList Al reboot, vienen varios ID así que los recorremos y guardamos todos y también recuperamos de las preferencias el nombre y el sonido*/ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { for(int i=0; i<appWidgetIds.length; i++){ //Metemos en el array los IDs de los widgets alWidgetsId.add(appWidgetIds[i]); //Recogemos las preferencias SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, 0); String nomSound = prefs.getString(PREF_PREFIX_NOM + appWidgetIds[i], null); int rawSound = prefs.getInt(PREF_PREFIX_RAW + appWidgetIds[i], 0); //Si están creadas, actualizamos la interfaz if(nomSound != null){ updateWidgetGrafico(context, appWidgetManager, appWidgetIds[i], nomSound, rawSound); } } } MediaPlayer.OnCompletionListener completionListener = new MediaPlayer.OnCompletionListener(){ public void onCompletion(MediaPlayer mp) { if(mp != null){ mp.stop(); mp.release(); mp = null; } } }; } Sorry for the comments in Spanish. I have the possibility to put differents widgets on the desktop, that's why I use the widgetId as the "unique id" for the PendingIntent. Any ideas please? The 70% of the functionality of my app is the widgets, and it isn't working for some users :( Thanks in advance and sorry for my English.

    Read the article

  • Odd Series of Packets, How would I reproduce this behavior?

    - by JustSmith
    I recorded a series of http packets that I cant programmatically recreate. The series of packets goes like this: HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Network.eth0.MACAddress,Properties.System.SerialNumber,DVTelTest,SightLogix.ProdShortName HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Properties.Image.Resolution HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=update&Network.RTSP.ProtViewer=password HTTP/1.1 HTTP GET /axis-cgi/admin/param.cgi?action=list&group=Event HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) HTTP GET /axis-cgi/admin/param.cgi?action=list&group=ImageSource.I0.Sensor HTTP/1.1 HTTP HTTP/1.1 200 OK (text/plain) Notice the two GET followed by one response. I though the two gets were going out at the same time but there is no corresponding number of responses. Also when trying to reproduce this pattern as the server if I abort the first GET request the client waits until it times out and starts the request over with out sending any other requests. What is happening here? How can I reproduce it?

    Read the article

  • How to make flash video show up under navigation element?

    - by Deshiknaves
    I know that the wmode needs to be either transparent or opaque for the video to show up under other elements on the page. I've added the wmode to the element and param in object, I still have no luck with it. <object width="400" height="225"><param name="wmode" value="transparent" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10875088&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10875088&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225" wmode="transparent"></embed></object><p><a href="http://vimeo.com/10875088">Clutchy Hopkins - Verbal Headlock</a> from <a href="http://vimeo.com/ubiquityrecords">Ubiquity Records</a> on <a href="http://vimeo.com">Vimeo</a>.</p>

    Read the article

  • How To use Simple Html Video Player Also Have Rewind Forward Capability For The Next Video ?? PHP HTML

    - by Syed Raza
    i am trying to use this code for video in html but fistle it is for flash videos and second thing is that it do not have rewind forward capability for the next video clip my code is, <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="250" height="250" align="middle"> <param name="allowScriptAccess" value="sameDomain"/> <param name="movie" value="Pro Tools Tutorials.swf"/> <param name="quality" value="high"/> <param name="bgcolor" value="#000000"/> <param name="allowFullScreen" value="true"/> <embed src="/unknittingmouse1.swf" quality="high" align="middle" bgcolor="#ffffff" width="250" height="230" allowFullScreen="true" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed> </object> we have to also be carefull that that video code will run on internet explorer Hopes to listen from you soon, thanks in advance

    Read the article

  • Get the property, as a string, from an Expression<Func<TModel,TProperty>>

    - by Jaxidian
    I use some strongly-typed expressions that get serialized to allow my UI code to have strongly-typed sorting and searching expressions. These are of type Expression<Func<TModel,TProperty>> and are used as such: SortOption.Field = (p => p.FirstName);. I've gotten this working perfectly for this simple case. The code that I'm using for parsing the "FirstName" property out of there is actually reusing some existing functionality in a third-party product that we use and it works great, until we start working with deeply-nested properties(SortOption.Field = (p => p.Address.State.Abbreviation);). This code has some very different assumptions in the need to support deeply-nested properties. As for what this code does, I don't really understand it and rather than changing that code, I figured I should just write from scratch this functionality. However, I don't know of a good way to do this. I suspect we can do something better than doing a ToString() and performing string parsing. So what's a good way to do this to handle the trivial and deeply-nested cases? Requirements: Given the expression p => p.FirstName I need a string of "FirstName". Given the expression p => p.Address.State.Abbreviation I need a string of "Address.State.Abbreviation" While it's not important for an answer to my question, I suspect my serialization/deserialization code could be useful to somebody else who finds this question in the future, so it is below. Again, this code is not important to the question - I just thought it might help somebody. Note that DynamicExpression.ParseLambda comes from the Dynamic LINQ stuff and Property.PropertyToString() is what this question is about. /// <summary> /// This defines a framework to pass, across serialized tiers, sorting logic to be performed. /// </summary> /// <typeparam name="TModel">This is the object type that you are filtering.</typeparam> /// <typeparam name="TProperty">This is the property on the object that you are filtering.</typeparam> [Serializable] public class SortOption<TModel, TProperty> : ISerializable where TModel : class { /// <summary> /// Convenience constructor. /// </summary> /// <param name="property">The property to sort.</param> /// <param name="isAscending">Indicates if the sorting should be ascending or descending</param> /// <param name="priority">Indicates the sorting priority where 0 is a higher priority than 10.</param> public SortOption(Expression<Func<TModel, TProperty>> property, bool isAscending = true, int priority = 0) { Property = property; IsAscending = isAscending; Priority = priority; } /// <summary> /// Default Constructor. /// </summary> public SortOption() : this(null) { } /// <summary> /// This is the field on the object to filter. /// </summary> public Expression<Func<TModel, TProperty>> Property { get; set; } /// <summary> /// This indicates if the sorting should be ascending or descending. /// </summary> public bool IsAscending { get; set; } /// <summary> /// This indicates the sorting priority where 0 is a higher priority than 10. /// </summary> public int Priority { get; set; } #region Implementation of ISerializable /// <summary> /// This is the constructor called when deserializing a SortOption. /// </summary> protected SortOption(SerializationInfo info, StreamingContext context) { IsAscending = info.GetBoolean("IsAscending"); Priority = info.GetInt32("Priority"); // We just persisted this by the PropertyName. So let's rebuild the Lambda Expression from that. Property = DynamicExpression.ParseLambda<TModel, TProperty>(info.GetString("Property"), default(TModel), default(TProperty)); } /// <summary> /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"/> with the data needed to serialize the target object. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data. </param> /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization. </param> public void GetObjectData(SerializationInfo info, StreamingContext context) { // Just stick the property name in there. We'll rebuild the expression based on that on the other end. info.AddValue("Property", Property.PropertyToString()); info.AddValue("IsAscending", IsAscending); info.AddValue("Priority", Priority); } #endregion }

    Read the article

  • SortList duplicated key, but it shouldn't

    - by Luca
    I have a class which implements IList interface. I requires a "sorted view" of this list, but without modifying it (I cannot sort directly the IList class). These view shall be updated when the original list is modified, keeping items sorted. So, I've introduced a SortList creation method which create a SortList which has a comparer for the specific object contained in the original list. Here is the snippet of code: public class MyList<T> : ICollection, IList<T> { ... public SortedList CreateSortView(string property) { try { Lock(); SortListView sortView; if (mSortListViews.ContainsKey(property) == false) { // Create sorted view sortView = new SortListView(property, Count); mSortListViews.Add(property, sortView); foreach (T item in Items) sortView.Add(item); } else sortView = mSortListViews[property]; sortView.ReferenceCount++; return (sortView); } finally { Unlock(); } } public void DeleteSortView(string property) { try { Lock(); // Unreference sorted view mSortListViews[property].ReferenceCount--; // Remove sorted view if (mSortListViews[property].ReferenceCount == 0) mSortListViews.Remove(property); } finally { Unlock(); } } protected class SortListView : SortedList { /// <summary> /// /// </summary> /// <param name="property"></param> /// <param name="capacity"></param> public SortListView(string property, int capacity) : base(new GenericPropertyComparer(typeof(T).GetProperty(property, BindingFlags.Instance | BindingFlags.Public)), capacity) { } /// <summary> /// Reference count. /// </summary> public int ReferenceCount = 0; /// <summary> /// /// </summary> /// <param name="item"></param> public void Add(T item) { Add(item, item); } /// <summary> /// /// </summary> /// <param name="item"></param> public void Remove(T item) { // Base implementation base.Remove(item); } /// <summary> /// Compare object on a generic property. /// </summary> class GenericPropertyComparer : IComparer { #region Constructors /// <summary> /// Construct a GenericPropertyComparer specifying the property to compare. /// </summary> /// <param name="property"> /// A <see cref="PropertyInfo"/> which specify the property to be compared. /// </param> /// <remarks> /// The <paramref name="property"/> parameter imply that the compared objects have the specified property. The property /// must be readable, and its type must implement the IComparable interface. /// </remarks> public GenericPropertyComparer(PropertyInfo property) { if (property == null) throw new ArgumentException("property doesn't specify a valid property"); if (property.CanRead == false) throw new ArgumentException("property specify a write-only property"); if (property.PropertyType.GetInterface("IComparable") == null) throw new ArgumentException("property type doesn't IComparable"); mSortingProperty = property; } #endregion #region IComparer Implementation public int Compare(object x, object y) { IComparable propX = (IComparable)mSortingProperty.GetValue(x, null); IComparable propY = (IComparable)mSortingProperty.GetValue(y, null); return (propX.CompareTo(propY)); } /// <summary> /// Sorting property. /// </summary> private PropertyInfo mSortingProperty = null; #endregion } } /// <summary> /// Sorted views of this ReactList. /// </summary> private Dictionary<string, SortListView> mSortListViews = new Dictionary<string, SortListView>(); } Practically, class users request to create a SortListView specifying the name of property which determine the sorting, and using the reflection each SortListView defined a IComparer which keep sorted the items. Whenever an item is added or removed from the original list, every created SortListView will be updated with the same operation. This seems good at first chance, but it creates me problems since it give me the following exception when adding items to the SortList: System.ArgumentException: Item has already been added. Key in dictionary: 'PowerShell_ISE [C:\Windows\sysWOW64\WindowsPowerShell\v1.0\PowerShell_ISE.exe]' Key being added: 'PowerShell_ISE [C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe]' As you can see from the exception message, thrown by SortedListView.Add(object), the string representation of the key (the list item object) is different (note the path of the executable). Why SortList give me that exception? To solve this I tried to implement a GetHashCode implementation for the underlying object, but without success: public override int GetHashCode() { return ( base.GetHashCode() ^ mApplicationName.GetHashCode() ^ mApplicationPath.GetHashCode() ^ mCommandLine.GetHashCode() ^ mWorkingDirectory.GetHashCode() ); }

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >