Search Results

Search found 39 results on 2 pages for 'dai bok'.

Page 1/2 | 1 2  | Next Page >

  • What code in inherit part

    - by FullmetalBoy
    Problem: Having problem to find a source solution (inherit code in view state) to display data from SokningPerformSearchViewModel and its generic list in view state. Questions/request: Need to display data from my viewmodel SokningPerformSearchViewModel and its generic list as a strongly typed (if possible)? This question is a follow-up from my previous question Display a view with many to many relationship // Fullmetalboy namespace BokButik1.ViewModels { public class SokningPerformSearchViewModel { public List<BokSearchResultViewModel> Boksss { get; set; } } } namespace BokButik1.ViewModels { public class BokSearchResultViewModel { public List<Bok> Boks { get; set; } public List<Bok_Forfattare> Bok_Forfattares { get; set; } } } public class SokningController : Controller [AcceptVerbs(HttpVerbs.Post)] public ActionResult PerformSearch(string txtSearch, Kategori kategoriNummer) { Search myTest = new Search(txtSearch, kategoriNummer); SkaparListor mySkaparListor = new SkaparListor(myTest.HamtaBokListaFranSokFunktion(), myIBok_ForfattareRepository.HamtaAllaBok_ForfattareNummer()); var performViewModel = mySkaparListor.RattBokOchForfattarListaTillViewModel(); var SokningIndexViewModel = new SokningPerformSearchViewModel { Boksss = performViewModel }; return View(SokningIndexViewModel); } <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BokButik1.ViewModels.SokningPerformSearchViewModel>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> PerformSearch </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>PerformSearch</h2> <table> <% foreach (var bok in Model.Boksss) { %> <tr> <td><%: bok.Boks %> av</td> <td rowspan="2"><%: bok.Bok_Forfattares %></td> <td rowspan="2"><div id="Div1"><input type="submit" value="Köp" /></div></td> </tr> <tr> <td></td> </tr> <tr> <td>.. </td> </tr> <% } %> </table> </asp:Content> namespace BokButik1.Models { public class SkaparListor { private List<Bok_Forfattare> _myIBok_ForfattareRepository; private List<Bok> _Bok; private List<BokSearchResultViewModel> _ViewBokSearch; public SkaparListor(List<Bok> pSpecifikBokLista, List<Bok_Forfattare> pBok_ForfattareLista) { _Bok = pSpecifikBokLista; _myIBok_ForfattareRepository = pBok_ForfattareLista; _ViewBokSearch = new List<BokSearchResultViewModel>(); } public List<BokSearchResultViewModel> RattBokOchForfattarListaTillViewModel() { foreach (var a in _Bok) { List<Bok> aaBok = new List<Bok>(); List<Bok_Forfattare> aaBok_Forfattare = new List<Bok_Forfattare>(); BokSearchResultViewModel results = new BokSearchResultViewModel(); aaBok.Add(a); foreach (var b in _myIBok_ForfattareRepository) { if(a.BokID == b.BokID) { aaBok_Forfattare.Add(b); } } results.Boks = aaBok; results.Bok_Forfattares = aaBok_Forfattare; _ViewBokSearch.Add(results); } return _ViewBokSearch; } } // Class }

    Read the article

  • saving and retrieving a text file in java?

    - by user3319432
    import java.sql. ; import java.awt.; import javax.swing.; import java.awt.event.; public class saving extends JFrame implements ActionListener{ JTextField edpno=new JTextField(10); JLabel l0= new JLabel ("EDP Number: "); JComboBox fname = new JComboBox(); JLabel l1= new JLabel("First Name: "); JTextField lname= new JTextField(20); JLabel l2= new JLabel("Last Name: "); // JTextField contno= new JTextField(20); // JLabel l3= new JLabel("Contact Number: "); JComboBox contno = new JComboBox(); JLabel l3 = new JLabel ("Contact Number: "); JButton bOK = new JButton("Save"); JButton bRetrieve = new JButton("Retrieve"); private ImageIcon icon; JPanel C=new JPanel(){ protected void paintComponent(Graphics g){ g.drawImage(icon.getImage(),0,0,null); super.paintComponent(g); } }; public Search Record (){ icon=new ImageIcon("images/canres.png"); C.setOpaque(false); C.setLayout(new GridLayout(5,2,4,4)); setTitle("Search Record"); C.add (l0); C.add (edpno); edpno.addActionListener(this); C.add (l1); C.add (fname); fname.setForeground(Color.BLUE); fname.setFont(new Font(" ", Font.BOLD,15)); C.add (l2); C.add (lname); C.add (l3); C.add (contno); contno.setForeground(Color.BLUE); contno.setFont(new Font(" ", Font.BOLD,15)); C.add(bOK); bOK.addActionListener(this); C.add (bRetrieve); bRetrieve.addActionListener(this); bOK.setBackground(Color.white); bRetrieve.setBackground(Color.white); } public void saverecord(){ try{ //Connect to the Database Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String path ="jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=Database/roomassign.mdb"; String DBPassword =""; String DBUserName =""; Connection con = DriverManager.getConnection(path,"",""); Statement s = con.createStatement(); s.executeQuery("select firstname, Lastname, contact number from name WHERE edpno ='"+edpno.getText()+"'"); ResultSet rs = s.getResultSet(); ResultSetMetaData md = rs.getMetaData(); while(rs.next()) { fname.setSelectedItem(rs.getString(1)); lname.setText(rs.getString(2)); contno.setSelectedItem(rs.getString(3)); // crs.setSelectedItem(rs.getString(4)); } s.close(); con.close(); } catch(Exception Q) { JOptionPane.showMessageDialog(this,Q); } } public void SaveRecord(){ try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String path = "jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=Database/roomassign.mdb"; String DBPassword =""; String DBUsername =""; Connection con = DriverManager.getConnection(path,"",""); Statement s = con.createStatement(); String sql = "UPDATE rooms SET Firstname='"+fname.getSelectedItem()+"',Lastname='"+lname.getText()+"',Contactnumber='"+contno.getSelectedItem()+"' WHERE '"+edpno.getText()+"'=edpno"; s.executeUpdate(sql); JOptionPane.showMessageDialog(this,"New room Record has been successfully saved"); dispose(); s.close(); con.close(); } catch(Exception Mismatch){ JOptionPane.showMessageDialog(this,Mismatch); } } public void actionPerformed (ActionEvent ako){ if (ako.getSource() == bRetrieve){ dispose(); } else if (ako.getSource() == bOK){ SaveRecord(); } } public static void main (String [] awtsave){ new Search(); } }

    Read the article

  • How can I copy/paste files via RDP in Kubuntu?

    - by Dai
    I recently installed the latest Kubuntu (x64) on my work machine as I am trying to migrate away from Windows. Unfortunately I use RDP very frequently to connect to customer's servers and need to be able to copy files across. I have tried the following packages with no luck: remmina rdesktop xfreerdp My latest attempt to solve this involved connecting one of my folders to the remote server, here is the command I used to launch rdesktop: rdesktop -5 -K -r disk:home=/home/dai -r clipboard:CLIPBOARD -r sound:off -x l -P 192.168.0.2 -u "administrator" -p pass The servers are not all running the same version of Windows, the one I've been trying so far is running Server 2003 R2. Customer servers range from Server 2000 to Server 2008. I've been Googling this like mad but all the solutions I find seem to fail, maybe because almost all the help out there assumes that I'm running Gnome. Sorry if this is a stupid question. Thanks in advance for your help. Edit: Copying and pasting text seems to work just fine, but that's not what I need.

    Read the article

  • vbscript xml problem

    - by user181421
    Hello Friends, I have this vbscript that calls a web service written in .net 2010. I'm getting an error at the last line. Can't figure it out. This is the webservice: http://www.kollelbaaleibatim.com/services/getinfo.asmx/GetFronpageInfo Dim xmlDOC Dim bOK Dim J Dim HTTP Dim ImagePathLeftCar, ImagePathRightCar Dim CarIDLeft, CarIDRight Dim ShortTitleLeftCar, ShortTitleRightCar Dim DescriptionLeftCar, DescriptionRightCar Dim PriceLeftCar, PriceRightCar Set HTTP = CreateObject("MSXML2.XMLHTTP") Set xmlDOC =CreateObject("MSXML.DOMDocument") xmlDOC.Async=False HTTP.Open "GET","http://www.kollelbaaleibatim.com/services/getinfo.asmx/GetFronpageInfo", false HTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" HTTP.Send() dim xmldoc2 set xmldoc2 = Server.CreateObject("Microsoft.XMLDOM") xmldoc2.async = False bOK = xmldoc2.load(HTTP.responseXML) if Not bOK then response.write( "Error loading XML from HTTP") end if response.write( xmldoc2.documentElement.xml)'Prints a good looking xml ShortTitleLeftCar = xmldoc2.documentElement.selectSingleNode("LeftCarShortTitle").text 'ERROR HERE

    Read the article

  • Facebook invites partialy working..

    - by dugi007
    Hello! im new to facebook api and i have a litle problem.. i created iframe app and im using the folowing code to invite my friends. invitation screen renders and im able to send invitation. when someone accepts invitation it redirects them to the following link: http://www.facebook.com/reqs.php#!//apps.facebook.com/erste_app/ and nothing happens (only the facebook header apears and thats all)...when they manualy repost that link they are redirected to app and everything works... <?php include 'facebook.php'; define( 'FB_API_KEY', 'e23463********9c7ebfd6d34' ); define( 'FB_SECRET', '5f6************7efff5c8cb8' ); define( 'FB_APPID', '312*********23' ); define( 'FB_CANVAS_URL', 'http://apps.facebook.com/erste_app/' ); define( 'FB_APP_HOME_URL', 'http://www.bijelarukavica.com/test/' ); define( 'FB_APP_NAME', 'Zaigraj s Rokom' ); $bOK=SendStandardInvitation("", false); function SendStandardInvitation($to, $bNewStyle = true) { $typeword = FB_APP_NAME; // Warning: double quotes in the content string will screw up the invite signature process $content = '<fb:req-choice url=\' ' . FB_CANVAS_URL . '\' label=\'Check out ' . FB_APP_NAME . ' />'; // if your have post add routines take them to that add app URL instead. $actionText = 'Probaj jesi bolji od mene uz "' . FB_APP_NAME . '".'; $bOK = SendNewRequest($to, $typeword, $content, $actionText); return $bOK; } function SendNewRequest($to, $typeword, $content, $actionText, $bInvitation = true) { $facebook = new Facebook(FB_API_KEY,FB_SECRET); $to = implode(",", $facebook->api_client->friends_get('','')); $bInviteAll = (!$to || $to == "" ? true : false); $excludeFriends = null; if (!$bInviteAll) $excludeFriends = $facebook->api_client->friends_get(); else // Get all friends with the app $excludeFriends = $facebook->api_client->friends_getAppUsers(); $excludeFriendsStr = null; foreach ($excludeFriends as $userid) { $pos = strpos($to, (string)$userid); if ($pos !== false) continue; if ($excludeFriendsStr) $excludeFriendsStr .= ','; $excludeFriendsStr .= $userid; } $params = array(); $params['api_key'] = FB_API_KEY; $params['content'] = $content; // Don't use htmlentities() or urlencode() here $params['type'] = $typeword; $params['action'] = FB_CANVAS_URL ; $params['actiontext'] = $actionText; $params['invite'] = ($bInvitation ? 'true' : 'false'); $params['rows'] = '5'; $params['max'] = '20'; $params['exclude_ids'] = $excludeFriendsStr; $params['sig'] = $facebook->generate_sig($params, FB_SECRET); $qstring = null; foreach ($params as $key => $value) { if ($qstring) $qstring .= '&'; $qstring .= "$key=".urlencode($value); } $inviteUrl = 'http://www.facebook.com/multi_friend_selector.php?'; $facebook->redirect($inviteUrl . $qstring); return true; } $facebook->api_client->notifications_sendRequest function SendRequest($to, $typeword, $content, $bInvitation = true) { $facebook = new Facebook(FB_API_KEY,FB_SECRET); $image = FB_APP_HOME_URL . 'logo.gif'; $result = $facebook->api_client->notifications_sendRequest($to, $typeword, $content, $image, $bInvitation); $url = $result; if (isset($url) && $url) { $facebook->redirect($url . '&canvas=1&next=index.php'); return true; } $bOK = ($result && $result != ""); return $bOK; } SendStandardInvitation($to, $bNewStyle = false) ?>

    Read the article

  • Remote Service Vs. Local Service

    - by Nguyen Dai Son
    Dear All, I am a newbiew to Android. I had read a lot of articles about Android Service but I am not clearly understanding what defferent between Local Service and Remote Service (except for "Local Service run in the same process as the lunching activity; remote services run in their own process" - The Busy Coder's Guide to Android Development - Mark L. Murphy ). Please shows me what different between Local Service and Remote Service. What's the advantage/disadvantage of using Local Service. What's the advantage/disadvantage of using Remote Service. Thanks & best regards Dai Son

    Read the article

  • Scalable Architecture for modern Web Development [on hold]

    - by Jhilke Dai
    I am doing research about Scalable architecture for Web Development, the research is solely to support Modern Web Development with flexible architecture which can scale up/down according to the needs without losing any core functionality. By Modern Web I mean to support all the Devices used to access websites, but the loading mechanism for all devices would be different. My quest of architecture is: For PC: Accessing web in PC is faster but it also depends on the Geo-location, so, the application would check by default the capacity of Internet/Browser and load the page according to it. For Mobile: Most of the mobile design these days either hide information or use different version of same application. eg: facebook uses m.facebook.com which is completely different than PC version. Hiding the things from Mobile using JavaScript or CSS is not a solution as it'll consume the bandwidth and make the application slow. So, my architecture research is about Serving one Application, which has different stack. When the application receives the request it'd send the Packaged Stack to the received request. This way the load time for end users would be faster and maintenance of application for developers would be easier. I am researching about for 4-tier(layered) architecture like: Presentation Layer Application Logic Layer -- The main Logic layer which stores the Presentation Stack Business Logic Layer Data Layer Main Question: Have you come across of similar architecture? If so, then can you list the links here, I'm very much interested to learn about those implementations specially in real world scenario. Have you thought about similar architectures and tried your own ideas, or if you have any ideas regarding this, then I urge to share. I am open to any discussions regarding this, so, please feel free to comment/answer.

    Read the article

  • Name of the Countdown Numbers round problem - and algorithmic solutions?

    - by Dai
    For the non-Brits in the audience, there's a segment of a daytime game-show where contestants have a set of 6 numbers and a randomly generated target number. They have to reach the target number using any (but not necessarily all) of the 6 numbers using only arithmetic operators. All calculations must result in positive integers. An example: Youtube: Countdown - The Most Extraordinary Numbers Game Ever? A detailed description is given on Wikipedia: Countdown (Game Show) For example: The contentant selects 6 numbers - two large (possibilities include 25, 50, 75, 100) and four small (numbers 1 .. 10, each included twice in the pool). The numbers picked are 75, 50, 2, 3, 8, 7 are given with a target number of 812. One attempt is (75 + 50 - 8) * 7 - (3 * 2) = 813 (This scores 7 points for a solution within 5 of the target) An exact answer would be (50 + 8) * 7 * 2 = 812 (This would have scored 10 points exactly matching the target). Obviously this problem has existed before the advent of TV, but the Wikipedia article doesn't give it a name. I've also saw this game at a primary school I attended where the game was called "Crypto" as an inter-class competition - but searching for it now reveals nothing. I took part in it a few times and my dad wrote an Excel spreadsheet that attempted to brute-force the problem, I don't remember how it worked (only that it didn't work, what with Excel's 65535 row limit), but surely there must be an algorithmic solution for the problem. Maybe there's a solution that works the way human cognition does (e.g. in-parallel to find numbers 'close enough', then taking candidates and performing 'smaller' operations).

    Read the article

  • A Web exception occurred because an HTTP 503 - ServiceUnavailable response was received from Unknown

    - by Dai
    As far as I can tell my Exchange 2010 Mailbox and Client Access server is working fine except for Outlook Anywhere. I fired up the Exchange Connectivity Tester and ran it against my server and I get this report: Part 5 Testing HTTP Authentication Methods for URL https://mail.contoso.com/rpc/rpcproxy.dll?server6.corp.contoso.com:6002. The HTTP authentication test failed. Additional details: A Web exception occurred because an HTTP 503 - ServiceUnavailable response was received from Unknown. When I do a search for "ServiceUnavailable response was received from Unknown." I get only a couple of relevant results, including a 22k-view Exchange Forum thread, but none of the solutions discussed help. There is nothing of relevance in the server's Event Log. mail.contoso.com is the public domain name of the CAS/MB/HT server. server6.corp.contoso.com is the internal domain name of the server.

    Read the article

  • Cannot get libcurl-devl on OpenSUSE 11.3

    - by Dai
    I have a server running OpenSUSE 11.3 that I can't really upgrade to a newer version of OpenSUSE (it's a managed appliance). I have some PHP shell scripts that need to run on the server that have a dependency on both cURL and OpenSSL. I discovered that the PHP 5.3.3 binaries on the server did not include OpenSSL but did include cURL I downloaded the latest PHP sources, extracted them, and ran ./configure --with-openssl --with-zlib --with-bcmath --with-curl --with-readline --with-libxml --enable-sockets This failed: the configure script complained that it couldn't find cURL: checking for cURL support... yes checking for cURL in default path... not found configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/ I tried to install libcurl by running zypper install libcurl-devl This failed too: doom:~/phpworksite/php-5.5.15 # zypper install libcurl-devl Loading repository data... Warning: Repository 'Updates for openSUSE 11.3 11.3-1.82' appears to outdated. Consider using a different mirror or server. Warning: Repository 'openSUSE_11.3_Updates' appears to outdated. Consider using a different mirror or server. Reading installed packages... 'libcurl-devl' not found in package names. Trying capabilities. No provider of 'libcurl-devl' found. Resolving package dependencies... Nothing to do. However, libcurl-devl is listed when I run zypper search curl. doom:~/phpworksite/php-5.5.15 # zypper search curl Loading repository data... Warning: Repository 'Updates for openSUSE 11.3 11.3-1.82' appears to outdated. Consider using a different mirror or server. Warning: Repository 'openSUSE_11.3_Updates' appears to outdated. Consider using a different mirror or server. Reading installed packages... S | Name | Summary | Type --+-----------------------------+----------------------------------------------------------+-------- i | curl | A Tool for Transferring Data from URLs | package | curlftpfs | Filesystem for mounting FTP hosts using FUSE and libcurl | package | libcurl-devel | A Tool for Transferring Data from URLs | package i | libcurl4 | cURL shared library version 4 | package i | perl-WWW-Curl | Perl extension interface for libcurl | package i | php5-curl | PHP5 Extension Module | package | python-curl | Python module interface to the cURL library | package | python-curl-doc | Documentation for python-curl | package | xmms2-plugin-curl | Curl Support for xmms2 | package | xmms2-plugin-curl-debuginfo | Debug information for package xmms2-plugin-curl | package doom:~/phpworksite/php-5.5.15 # Here are the current repositories. doom:~/phpworksite/php-5.5.15 # zypper repos # | Alias | Name | Enabled | Refresh ---+----------------------------------------------+----------------------------------------------+---------+-------- 1 | PHP_extensions_(openSUSE_11.3) | PHP_extensions_(openSUSE_11.3) | No | Yes 2 | Packman_11.3 | Packman_11.3 | Yes | Yes 3 | Updates for openSUSE 11.3 11.3-1.82 | Updates for openSUSE 11.3 11.3-1.82 | Yes | Yes 4 | openSUSE_11.3_OSS | openSUSE_11.3_OSS | Yes | Yes 5 | openSUSE_11.3_Updates | openSUSE_11.3_Updates | Yes | Yes 6 | openSUSE_BuildService_-_devel:languages:perl | openSUSE_BuildService_-_devel:languages:perl | No | Yes 7 | repo-debug | openSUSE-11.3-Debug | No | Yes 8 | repo-non-oss | openSUSE-11.3-Non-Oss | Yes | Yes 9 | repo-oss | openSUSE-11.3-Oss | Yes | Yes 10 | repo-source | openSUSE-11.3-Source | No | Yes BTW, I did try building PHP without cURL, however it broke a lot of things, so apparently I really need cURL. My question: how can I install libcurl-devl (or just install cURL) so that I can build PHP?

    Read the article

  • Suse 12.3 cannot boot after a forced shutdown

    - by David Dai
    I was doing a system update using zypper update After a while the screen was filled with this message failed to start system logging service. and the system was not responding. I had to shutdown it by holding the power button. then I started the machine again, and selected to boot suse. Then I saw the fancy boot animation(some shiny big dots gathering to the center of the screen), then the screen just turned black and the monitor sayed "no signal". then I tried to boot into suse failsafe mode, which was fine. how can I investigate into this problem?

    Read the article

  • Cannot access host from a virtualbox guest using bridged adapter

    - by David Dai
    I have a windows 7 host with firewall turned off. And I have a windowsXP guest running on Virtualbox 4.2.4r81684. In my windowsXP guest I tried to connect to the FTP server on my host machine(which used to work well) but it didn't work. I tried to ping my host machine, but it didn't work either. Then I tried to ping my guest from host, it worked well. my guest ip is :192.168.1.95 my host ip is : 192.168.1.9 route table on guest machine is this: C:\Documents and Settings\wenlong>route PRINT =========================================================================== Interface List 0x1 ........................... MS TCP Loopback interface 0x2 ...08 00 27 66 54 6c ...... AMD PCNET Family PCI Ethernet Adapter #2 - Packe t Scheduler Miniport =========================================================================== =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.95 20 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.1.0 255.255.255.0 192.168.1.95 192.168.1.95 20 192.168.1.95 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.1.255 255.255.255.255 192.168.1.95 192.168.1.95 20 224.0.0.0 240.0.0.0 192.168.1.95 192.168.1.95 20 255.255.255.255 255.255.255.255 192.168.1.95 192.168.1.95 1 Default Gateway: 192.168.1.1 =========================================================================== Persistent Routes: None arp cache is this: C:\Documents and Settings\wenlong>arp -a Interface: 192.168.1.95 --- 0x2 Internet Address Physical Address Type 192.168.1.1 00-26-f2-60-3c-04 dynamic 192.168.1.9 90-e6-ba-c2-90-2f dynamic It's strange because there was no problem days before and I didn't make any changes to the setting. could anybody help? PS. the guest can communicate with other machines in the LAN(for example 192.168.1.114) ok. it just cannot connect to the host machine.

    Read the article

  • How to enable the 2 concurrent (+1 console) sessions on Windows Server 2012

    - by Dai
    I have a Windows Server 2012 VM running on Windows Azure. I want to enable the ability for 2 simultaneous administrative sessions over Remote Desktop. This is permitted under the EULA for Windows Server 2012. This is NOT the same thing as the fully-blown Terminal Services / RDS feature. In Windows Server 2000 and 2003, multiple concurrent sessions (up to a limit of 2, plus the root /console session) were enabled by default (such that logging-in via RDP without logging-out first would create a new session rather than reconnecting to the old session). In Server 2008 and later it uses single-sessions by default, as this simplifies administration (as most people want to connect to old sessions). In Windows Server 2008 R2, you can add the MMC snap-ins for Remote Desktop Host Configuration which allows you to re-enable concurrent sessions. However, in Server 2012, after adding the Remote Administration snap-ins from Server Manager it seems the Remote Desktop Host Configuration snap-in has been removed. How can I re-enable the multiple concurrent sessions for Remote Desktop for Administration in Windows Server 2012?

    Read the article

  • 2 pdfs look same on XP, different on Win7

    - by David Dai
    I have 2 pdf files. I compared them with WinMerge, BeyondCompare, and even compared their checksums. They are exactly the same to me in every way. If I open them with Adobe Reader in Xp, and compare them with my bare eyes, they look the same. But!!! If I open them with Adobe Reader in Win7, and compare them with my bare eyes, they look very different!(particularly border width). I'm sorry I cannot share the 2 pdf files but I will appreciate it if anyone could come up with any idea!

    Read the article

  • PHP-FPM Pool, Child Processes and Memory Consumption

    - by Jhilke Dai
    In my PHP-FPM configuration I have 3 Pools, the eg: Config is: ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 1 ; ;;;;;;;;;;;;;;;;;;;;;;; [www1] user = www group = www listen = /tmp/php-fpm1.sock; listen.backlog = -1 listen.owner = www listen.group = www listen.mode = 0666 pm = dynamic pm.max_children = 40 pm.start_servers = 6 pm.min_spare_servers = 6 pm.max_spare_servers = 12 pm.max_requests = 250 slowlog = /var/log/php/$pool.log.slow request_slowlog_timeout = 5s request_terminate_timeout = 120s rlimit_files = 131072 ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 2 ; ;;;;;;;;;;;;;;;;;;;;;;; [www2] user = www group = www listen = /tmp/php-fpm2.sock; listen.backlog = -1 listen.owner = www listen.group = www listen.mode = 0666 pm = dynamic pm.max_children = 40 pm.start_servers = 6 pm.min_spare_servers = 6 pm.max_spare_servers = 12 pm.max_requests = 250 slowlog = /var/log/php/$pool.log.slow request_slowlog_timeout = 5s request_terminate_timeout = 120s rlimit_files = 131072 ;;;;;;;;;;;;;;;;;;;;;;; ; Pool 3 ; ;;;;;;;;;;;;;;;;;;;;;;; [www3] user = www group = www listen = /tmp/php-fpm3.sock; listen.backlog = -1 listen.owner = www listen.group = www listen.mode = 0666 pm = dynamic pm.max_children = 40 pm.start_servers = 6 pm.min_spare_servers = 6 pm.max_spare_servers = 12 pm.max_requests = 250 slowlog = /var/log/php/$pool.log.slow request_slowlog_timeout = 5s request_terminate_timeout = 120s rlimit_files = 131072 I calculated the pm.max_children processes according to some example calculations on the web like 40 x 40 Mb = 1600 Mb. I have separated 4 GB of RAM for PHP, now according to the calculations 40 Child Processes via one socket, and I have total of 3 sockets in my Nginx and FPM configuration. My doubt is about the amount of memory consumption by those child processes. I tried to create high load in the server via httperf hog and siege but I could not calculate the accurate memory usage by all the PHP processes (other processes like MySQL and Nginx were also running). And all the sockets were in use, So, I seek guidance from anyone who have done this before or know how exactly the pm.max_children in PHP Works. Since I have 3 Pools/sockets with 40 child processes does that count to 3 x 40 x 40 Mb of Memory usage ? or it is just like 40 Max. Child processes sharing 3 sockets (and the total memory usage is just 40 x 40 Mb) ?

    Read the article

  • Fabbrica Futuro Nord-Est

    - by Paolo Leveghi
     Il 27 giugno a Verona si è tenuta la seconda edizione di Fabbrica Futuro dedicata all’area Nord Est d’Italia rivolta a tutti gli attori del mercato manifatturiero che ha voluto mettere a confronto idee, raccontare casi di eccellenza e proporre soluzioni concrete per, come recita il sottotitolo del progetto, l’azienda manifatturiera del domani, e in particolare per le aziende produttrici del Triveneto.All’evento sono intervenute un centinaio di persone, in prevalenza Imprenditori e Manager di linea di aziende appartenenti al settore manifatturiero italiano, con una redemption tra iscritti e presenti di poco inferiore al 50% (48,7%). La dimensione aziendale maggiormente rappresentata dai visitatori presenti è la media azienda produttrice del tessuto manifatturiero italiano.I giudizi espressi dai partecipanti che hanno compilato il questionario di feedback, raccontano di un’esperienza positiva sia in termini organizzativi che di contenuto delle relazioni proposte e del livello dei relatori. La giornata ha visto infatti l’esposizione di 17 interventi, tutti in un’unica sessione plenaria, per un totale di 19 relatori tra accademici, utenti e rappresentanti di aziende del mercato dell’offerta.Altro segnale di forte interesse all’evento è stato il numero di richieste per l’attivazione alla newsletter al sito www.fabbricafuturo.it grazie alla quale si può essere costantemente aggiornati sui nuovi contenuti pubblicati e su tutti i prossimi appuntamenti in calendario. A breve inoltre verranno resi disponibili anche i contenuti video filmati durante tutta la sessione plenaria.Il pubblico coinvolto fino ad ora, oltre ad esprimere grande soddisfazione per i contenuti di carattere generale espressi da Fabbrica Futuro, ha chiesto di affiancare a temi più generali approfondimenti più mirati e casi pratici relativi a settori specifici. Da questa esigenza nascono gli “incontri verticali” di Fabbrica Futuro, cinque incontri di approfondimento su specifici temi di interesse per le aziende manifatturiere e che focalizzano le esigenze di specifici mercati di questo settore. Oracle ha partecipato con Sergio Gimelli, che ha parlato dei vantaggi che le aziende possono ottenere adottando un'architettura Cloud per i loro sistemi, portando degli interessanti esempi. .htmtableborders, .htmtableborders td, .htmtableborders th {border : 1px dashed lightgrey ! important;} html, body { border: 0px; } body { background-color: #ffffff; } img, hr { cursor: default }

    Read the article

  • remote desktop: the app on the remote machine is confusing the controller's hostname with its own hostname

    - by David Dai
    I have 2 machines A, B, both run Windows OS. A is my work machine, B is a server on which I have already installed SQLServer. Now I want to install another software on B which runs on top of the SQLServer. I remote connect to B from A. Then on the remote desktop, I start the installer, along the installation process, there's a step where I can configure which server to connect to. normally B's hostname is entered automatically to the hostname field. The issue I'm having is, when I get to that step, A's hostname is entered automatically instead of B's, and even if I manually correct it to 'localhost' or '127.0.0.1' or B's hostname, the installer still cannot connect to B's service as if it still try to connect to A. Theoretically, how does this happen? how is this possible?

    Read the article

  • Poante cu avocati

    - by interesante
    Avocatul isi intreaba unul din viitorii clienti: - Si aveti banii necesari pentru a va permite sa fiti aparat de mine? - Da, am doua casete cu bijuterii. - Bine, atunci sa vedem...De ce sunteti acuzat? - De furtul celor doua caste cu bijuterii...Relaxeaza-te citind un blog amuzant si haios cu cele mai noi glume si bancuri de tot felul.Intr-un avion, un avocat nimereste langa o blonda super. Bla, bla, tot incerca sa intre in vorba cu ea ... nimic. Blonda se uita pe geam, mai incerca sa doarma ... Avocatul, enervat: - Uite, hai sa jucam un joc ! Eu iti pun tie o intrebare, si daca nu stii imi dai 5$, apoi imi pui tu mie o intrebare, si daca nu stiu iti dau 5 $! Si tot asa ... - Nu, domnule, imi pare rau, sunt obosita. As prefera sa ma odihnesc ... Avocatul, enervandu-se si mai tare: - Bine, uite, jucam alt joc! Eu iti pun tie o intrebare, daca nu stii imi dai 5$; tu imi pui mie o intrebare, si daca nu stiu ... iti dau 500$ ! Blonda accepta, intr-un tarziu. - Care este distanta de la Pamant la Luna ? Blonda deschide geanta si ii da 5$, dupa care il intreaba: - Ce e mic, are 3 picioare si urca dealul ? Avocatul, se gandeste ... scoate laptop-ul, cauta in baza de date ... cauta pe Internet ... trimite mail-uri la toti prietenii ... In sfarsit, dupa o ora, transpirat, ii da blondei 500$. Blonda ii ia, apoi se intoarce si incepe sa se uite plictisita pe geam. Avocatul, isterizat, vrea sa afle raspunsul: - Bine, bine, ce e mic, are trei picioare si urca dealul ? La care, blonda deschide tacticoasa geanta si ii da o hartie de 5$.

    Read the article

  • Are there any Graphical PowerShell tools?

    - by Dai
    As a developer for the .NET platform, I like to "explore" a platform, framework or API by browsing through the API documentation which explains what everything is - everything is covered and when I use tools like Reflector or Object Browser then I get to know for certain what I'm working with. When I'm writing my own software I can use tools like the Object Test Bench to explore and work with my classes directly. I'm looking for something similar, but for PowerShell - and ones that avoid text-mode. PowerShell is nice, and there are a lot of cool "discoverability"-things it has, such as the "Verb-Noun" syntax, however when I'm working with Exchange Server, for example, I wanted to get a list of AD Permissions on a Receive Connector and I got this list: [PS] C:\Windows\system32>Get-ADPermission "Client SVR6" -User "NT AUTHORITY\Authenticated Users" | fl User : NT AUTHORITY\Authenticated Users Identity : SVR6\Client SVR6 Deny : False AccessRights : {ExtendedRight} IsInherited : False Properties : ChildObjectTypes : InheritedObjectType : InheritanceType : All User : NT AUTHORITY\Authenticated Users Identity : SVR6\Client SVR6 Deny : False AccessRights : {ExtendedRight} IsInherited : False Properties : ChildObjectTypes : InheritedObjectType : InheritanceType : All User : NT AUTHORITY\Authenticated Users Identity : SVR6\Client SVR6 Deny : False AccessRights : {ExtendedRight} IsInherited : False Properties : ChildObjectTypes : InheritedObjectType : InheritanceType : All User : NT AUTHORITY\Authenticated Users Identity : SVR6\Client SVR6 Deny : False AccessRights : {ExtendedRight} IsInherited : False Properties : ChildObjectTypes : InheritedObjectType : InheritanceType : All User : NT AUTHORITY\Authenticated Users Identity : SVR6\Client SVR6 Deny : False AccessRights : {ExtendedRight} IsInherited : False Properties : ChildObjectTypes : InheritedObjectType : InheritanceType : All User : NT AUTHORITY\Authenticated Users Identity : SVR6\Client SVR6 Deny : True AccessRights : {ReadProperty} IsInherited : True Properties : {ms-Exch-Availability-User-Password} ChildObjectTypes : InheritedObjectType : ms-Exch-Availability-Address-Space InheritanceType : Descendents [PS] C:\Windows\system32> Note how the first few entries contain identical text - there's no way to tell them apart easily. But if there was a GUI presumably it would let me drill-down into the differences better. Are there any tools that do this?

    Read the article

  • How do I install hiphop-php in CentOS 6?

    - by Dai
    I've been trying to install hiphop-php on CentOS 6 with no luck. I found an .rpm for it but it fails dependency checks on boost which fails to install because it depends on curl which fails to install because it can't overwrite /etc/lib64/libcurl.so.4 I can't remove the current curl version because half the system seems to depend on it. Has anybody had any luck doing this? It's driving me mad. I tried compiling from source but that's even more hellish and I really have no idea what I'm doing anyway.

    Read the article

  • nginx auth_basic errors: user not found and no user/password provided

    - by Jhilke Dai
    I have set auth basic in nginx and blocked other ips like: location / { auth_basic "Restricted Area"; auth_basic_user_file .htpasswd; allow 127.0.0.1; deny all; } I can login using the username/password provided in .htpasswd but the error log in nginx shows errors like: user "memcache" was not found in "/etc/nginx/.htpasswd" no user/password was provided for basic authentication Any suggestion why this occurs and how to get rid of it ?

    Read the article

  • NHibernate Query across multiple tables

    - by Dai Bok
    I am using NHibernate, and am trying to figure out how to write a query, that searchs all the names of my entities, and lists the results. As a simple example, I have the following objects; public class Cat { public string name {get; set;} } public class Dog { public string name {get; set;} } public class Owner { public string firstname {get; set;} public string lastname {get; set;} } Eventaully I want to create a query , say for example, which and returns all the pet owners with an name containing "ted", OR pets with a name containing "ted". Here is an example of the SQL I want to execute: SELECT TOP 10 d.*, c.*, o.* FROM owners AS o INNER JOIN dogs AS d ON o.id = d.ownerId INNER JOIN cats AS c ON o.id = c.ownerId WHERE o.lastname like '%ted%' OR o.firstname like '%ted%' OR c.name like '%ted%' OR d.name like '%ted%' When I do it using Criteria like this: var criteria = session.CreateCriteria<Owner>() .Add( Restrictions.Disjunction() .Add(Restrictions.Like("FirstName", keyword, MatchMode.Anywhere)) .Add(Restrictions.Like("LastName", keyword, MatchMode.Anywhere)) ) .CreateCriteria("Dog").Add(Restrictions.Like("Name", keyword, MatchMode.Anywhere)) .CreateCriteria("Cat").Add(Restrictions.Like("Name", keyword, MatchMode.Anywhere)); return criteria.List<Owner>(); The following query is generated: SELECT TOP 10 d.*, c.*, o.* FROM owners AS o INNER JOIN dogs AS d ON o.id = d.ownerId INNER JOIN cats AS c ON o.id = c.ownerId WHERE o.lastname like '%ted%' OR o.firstname like '%ted%' AND d.name like '%ted%' AND c.name like '%ted%' How can I adjust my query so that the .CreateCriteria("Dog") and .CreateCriteria("Cat") generate an OR instead of the AND? thanks for your help.

    Read the article

  • What is your strategy to avoid dynamic typing errors in Python (NoneType has no attribute x)?

    - by Koen Bok
    Python is one of my favorite languages, but I really have a love/hate relationship with it's dynamicness. Apart from the advantages, it often results in me forgetting to check a type, trying to call an attribute and getting the NoneType (or any other) has no attribute x error. A lot of them are pretty harmless but if not handled correctly they can bring down your entire app/process/etc. Over time I got better predicting where these could pop up and adding explicit type checking, but because I'm only human I miss one occasionally and then some end-user finds it. So I'm interested in your strategy to avoid these. Do you use type-checking decorators? Maybe special object wrappers? Please share...

    Read the article

  • What is your strategy to avoid dynamic typing errors in Python (NoneType has not attribute x)?

    - by Koen Bok
    Python is one of my favorite languages, but I really have a love/hate relationship with it's dynamicness. Apart from the advantages, it often results in me forgetting to check a type, trying to call an attribute and getting the NoneType (or any other) has no attribute x error. A lot of them are pretty harmless but if not handled correctly they can bring down your entire app/process/etc. Over time I got better predicting where these could pop up and adding explicit type checking, but because I'm only human I miss one occasionally and then some end-user finds it. So I'm interested in your strategy to avoid these. Do you use type-checking decorators? Maybe special object wrappers? Please share...

    Read the article

  • MVC Localization of Default Model Binder

    - by Dai Bok
    Hi, I am currently trying to figure out how to localize the error messages generated by MVC. Let me use the default model binder as an example, so I can explain the problem. Assuming I have a form, where a user enters thier age. The user then enters "ten" in to the form, but instead of getting the expected error of "Age must be beween 18 and 25." the message "The value 'ten' is not valid for Age." is displayed. The entity's age property is defined below: [Range(18, 25, ErrorMessageResourceType = typeof (Errors), ErrorMessageResourceName = "Age", ErrorMessage = "Range_ErrorMessage")] public int Age { get; set; } After some digging, I notice that this error text comes from the System.Web.Mvc.Resources.DefaultModelBinder_ValueInvalid in the MvcResources.resx file. Now, how can create localized versions of this file? As A solution, for example, should I download MVC source and add MvcResources.en_GB.resx, MvcResources.fr_FR.resx, MvcResources.es_ES.resx and MvcResources.de_DE.resx, and then compile my own version of MVC.dll? But I don't like this idea. Any one else know a better way?

    Read the article

1 2  | Next Page >