Posts

python - Edit an account in Sugarcrm -

python - Edit an account in Sugarcrm - i having problem uploading file, form sugarcrm. i using this tutorial, states next code should update account: #2 - update existing entry sugarcrm_conn= none try: sugarcrm_conn = sugarcrm.sugarcrm(url = sugarcrm_url, username = sugarcrm_user, password = sugarcrm_pass) print "connected sugar via rest" except valueerror: print "cann't connect " + sugarcrm_url exit(1) accounts = sugarcrm_conn.module('accounts') #we show first 10 of them. business relationship in accounts[:10]: account.setvalue(['shipping_address_postalcode','email'],['4144','test@gmail.com']) the problem having error: sugarcrm instance has no attribute 'module' for line sugarcrm instance has no attribute 'module' have missed something? clarify, can connect sugarcrm , have added accounts, displayed them. query = sugarcrm_conn['accounts'].que...

java - Simple Program Does Not Work Correctly -

java - Simple Program Does Not Work Correctly - import java.util.scanner; public class welcome { public static void main(string[] args) { scanner input = new scanner(system.in); double = input.nextdouble(); double b = input.nextdouble(); double c = input.nextdouble(); double rezultat = - b + math.sqrt(math.pow(b, 2) - 4 * * c) / 2 * a; system.out.println(rezultat); } } i wonder why code not work should. printed result always: nan math.sqrt(math.pow(b, 2) - 4 * * c) this portion homecoming nan. if plug in values of (1, 0, 1) x^2 + 1, nan never crosses x line. in other words, if math.pow(b, 2) - 4 * * c) < 0, should expect nan. if trying quadratic formula, proper equation be: double rezultat = (-b + math.sqrt(math.pow(b, 2) - 4 * * c)) / (2 * a); you need take business relationship order of operations, more in java. original operation have returned not have been x. additionally, there 2 e...

design - Using nested loops to create a box with stars in java -

design - Using nested loops to create a box with stars in java - i new java , taking intro course. i have been able figure out bulk of question stuck on lastly step. the end result supposed using 4 or less system.out.print or system.out.println statements: ******* * ***** * **** * *** * ** * * ******* and have created this ******* * ***** * **** * *** * ** * * * this code. there guys can see help? public class starpatterns { public static void main(string[] args) { int col; int row; (row = 6; row >= 0 ; row--) { if (row >= 0) system.out.print("*"); (col = row; col < 6; col++) { system.out.print(" "); } (col = row; col > 0; col--) { system.out.print("*"); } system.out.println(); } } } public class stars { public static void...

c# - How to fire event out of threading mode -

c# - How to fire event out of threading mode - i used component socket connection in c# i connect 10 tcp object server threading. , recived info in event (data_onrecived) here code: // connect function private void connect(object state) { tcp tcp = (tcp)state; tcpsession tcpsession = new tcpsession(); tcpsession.remoteendpoint = new dart.sockets.ipendpoint(ip, convert.toint32(port)); tcpsession.connecttimeout = 1; seek { tcp.connect(tcpsession); } catch(system.net.sockets.socketexception ex) { tcp.marshal(ex); } } // initial tcp component private void tcpinitialize() { (int = 0; < maxconnection; i++) { socketcontrol[i].tcpconnection = new tcp(); socketcontrol[i].tcpconnection.data += new system.eventhandler<dart.sockets.dataeventargs>(this.tcp_data); socketcontrol[i].tcpconnection.sta...

date formatting - Why is this format "[$-F400]h:mm:ss\ AM/PM" a 24 hour format in Excel? -

date formatting - Why is this format "[$-F400]h:mm:ss\ AM/PM" a 24 hour format in Excel? - and yet 1 [$-409]h:mm:ss\ am/pm;@ not , shows am/pm correctly? i'm using npoi read excel file , extract useful info app. while parsing dates, stumbled across interesting case. this date 16:00:00 (4 o'clock in afternoon) format [$-f400]h:mm:ss\ am/pm showing 16:00:00 in excel. yet similar format, [$-409]h:mm:ss\ am/pm;@ , shows 04:00:00 pm , believe right because of am/pm notation @ end of format string. my excel version one: microsoft® office excel® 2007 (12.0.6665.5003) sp3 mso (12.0.6662.5000) and i'm using latest version of npoi (got source code), interprets [$-f400]h:mm:ss\ am/pm hh:mm:ss tt (which doesn't match way excel shows it) i know [$-xxxx] locale, don't know ;@ . why, depending on circunstances, excel ignoring am/pm part? edit: appears @ text-placeholder am/pm seems. absence of token forcing excel show 24-hour format? ...

html - menu bar shrink when i restore down browser -

html - menu bar shrink when i restore down browser - here seek create menu ... menu seems fine when browsers in maximize , seems image1 but when restore downwards browser menu image 2 code <!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"> <head> <title>gatr enterprise - home</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script src="js/mymenu1.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="css/style.css" /> <script type="text/javascript"> <!-- function text_newsletter_onclick() { } // --> </script> <style type="text/css"> .style1 { width: 100%; } ...

javascript - How can I get only the specific H3 I am hovering over to show and not all of them? -

javascript - How can I get only the specific H3 I am hovering over to show and not all of them? - i trying have text appear on each image user hovers on specific image. don't want of text every image appear when user hovers on 1 image. have 1 photo becomes opaque right text shows every image when hovering on image. html: <div class="image"> <img class="projectimage" src="images/peralta.png" alt=""> <h3 class="hiddenh3">this test!</h3> </div> scss: .image { position: relative; width: 100%; .projectimage { width: 100%; transition: 0.5s ease-in; } .hiddenh3 { display: none; position: absolute; top: 45%; width: 100%; } } js: $('.projectimage').on("mouseover", function() { $(this).closest('.projectimage').addclass("cooleffect"); $('.hiddenh3').fadein(1000); }); $('.projectimage').on(...