Posts

php - Read Excel Data (Rich Excel Data) -

i want read data form excel file , show in html . know there several libraries phpexcel , php-exelreader so. but, want keep format in excel file. example : −19×10 −17 j should parsed −19&times;10<sup>−17</sup> j and m 1 r 1 : m 2 r 2 m<sub>1</sub>r<sub>1</sub> : m<sub>2</sub>r<sub>2</sub> . is there library so? have googled did not solution this. please recommend libraries or tutorial task. any highly appreciated. update - want store data in database. got solution. it's phpexcel . while fetching values cells, did following. $value = $cell->getvalue(); if($value instanceof phpexcel_richtext) { $cellvalueasstring = ''; $elements = $value->getrichtextelements(); foreach ($elements $element) { if ($element instanceof phpexcel_richtext_run) { if ($element->getfont()->getsuperscript()) { $cell...

javascript - get date from today to weekend -

i have 1 datepicker function , there small code:- $('ul li').click(function(){ var dat = $.datepicker.formatdate('yy/mm/dd', new date()); $('#date').append(dat); }) this html:- <div> <ul> <li>this weekend</li></ul></div> <p id="date"> </p> my try demo jsfiddle : - http://jsfiddle.net/pmmkc/1/ here try click on li this weekend want date today weekend. don't know how work. please me out this. thanks. try $('ul li').click(function(){ var date = new date(); var day = date.getday(); while(day < 7){ $('#date').append($.datepicker.formatdate('yy/mm/dd', date)); date.setdate(date.getdate() + 1); day++; } }) demo: fiddle

c# - Entity Framework v5 loading relational data -

i have 2 simple poco want connect through 1 many relation public class menu { public int menuid { get; set; } public bool isactive { get; set; } public icollection<menumember> menumembers { get; set; } } public class menumember { public int menumemberid { get; set; } public int menuid { get; set; } public string viewroute { get; set; } public bool isactive{ get; set; } } public class efdbcontext : dbcontext { public dbset<page> pages { get; set; } public dbset<menu > menus { get; set; } public dbset<menumember> menumembers{ get; set; } } now have simple , resources on internet suprisingly vague (or dumb) i want write lambda expression for select * menu inner join menumembers on menu.menuid = menumembers.menuid menu.menuid = 1 i have used ienumerable<menu> menu = repository.menus.where(x => x.menuid == menuid); but when iterate on it, menu.menunumbers stays null. believe sort of ...

Chinese characters in watermark not shown properly when iTextSharp is used. Some characters are shown as questionmark -

while adding watermark pdf file using itextsharp, chinese characters shown question marks. i tried base font helvetica , tried options cp1252. tried giving font name present in windows fonts , supports chinese. every time question marks displayed in final pdf file instead of chinese characters. helvetica contains limited number of latin glyphs. explained in itext documentation , can't use font create chinese characters. need font file, such arialuni.ttf , use create basefont object. use basefont object add string @ absolute position or create font object use in high-level object. here examples: how use font file such arialbd.ttf: encodingexample in case, you'd use arialuni.ttf , encoding identity_h how use true type collection if don't have ttf file: ttcexample how create string contains glyphs require different fonts: fontselectionexample all these examples taken chapter 11 of book itext. if browse documentation, you'll find pdf examples,...

c# - ajax dropdown extender at runtime -

Image
i've got textbox ajax dropdown extender. how make image 2 @ runtime , not when hovering on textbox. textbox "downbutton" should image 2 @ design time how do or reading material on how this? edit all i've done far i'm trying first display correctly, otherwise have find way: <asp:content id="bodycontent" runat="server" contentplaceholderid="maincontent"> <asp:scriptmanager id="scriptmanager1" runat="server"> </asp:scriptmanager> <div> <asp:textbox id="txtresidence" runat="server"></asp:textbox> <asp:dropdownextender id="txtresidence_dropdownextender" runat="server" dynamicservicepath="" enabled="true" targetcontrolid="txtresidence" dropdowncontrolid="pnlres"> </asp:dropdownextender> </div> <div...

How to click a link in WebDriver using Python? -

<tr><td class=wb><a href="javascript:void(fight())" style='text-decoration:none'><b>click here!</a></td></tr> hi, how click url? i'm not sure, try this: elements = driver.find_elements_by_tag_name("td") element in elements: if element.text == "click here!": element.click() or: elements = find_elements_by_class_name("wb") element in elements: if element.text == "click here!": element.click()

Simple Login Screen using LDAP in GWT -

hi friends, i have simple login authentication using ldap in gwt. had done in java.but don't know implement same in gwt. me if knows... pasted here java source here : package com.ldap.test; import java.util.*; import javax.naming.*; import javax.naming.directory.*; public class ldaptest { @suppresswarnings("unchecked") public static void main(string[] args) { try { @suppresswarnings("rawtypes") hashtable env = new hashtable(); env.put(context.initial_context_factory, "com.sun.jndi.ldap.ldapctxfactory"); env.put(context.provider_url, "ldap://localhost:389"); //replace server url/ip //only digest-md5 works our windows active directory env.put(context.security_authentication, "simple"); //no other sals worked me env.put(context.security_principal...