Posts

Featured post

php - regexp cyrillic filename not matches -

i take list of files php glob(."*.pdf") . files have cyrillic names. example: ООО «Ð Ð¾Ð³Ð° и копыта» then load company names database , try find them in file names: preg_match("/$firm_name/ui", $file_name, $match); i have problem: firms if $firm_name visually similar $file_name , preg_match says there no match. mb_detect_encoding both variables return utf-8. there problem in file name, or maybe there encoding or something, can not understand, ask help. upd: $file_name='ООО «Ð Ð¾Ð³Ð° и копыта»'; preg_match("/... .Рога и копыта./ui", $file_name, $match); as result, ОО «Ð Ð¾Ð³Ð° и копыта» , 1 О missing

sql - Select Query has unexpected multiple records (MS Access) -

i may tired, can't seem figure out happening. have 2 queries. query 1 has 10 fields. query 2 has 5 fields. fields 1 through 3 same in both queries. trying write select query , simple add field 5 query2 query1 result should query1 additional field (query2.field5). i join first 3 fields both queries , choose select records in query1 , in query2 match. don't know sql, use query designer. expect same number of records have query 1 instead have 3 times or more. can tell me doing wrong. tried reversing joins still seem same records. thanks in advance. here query: the fields in common divisionname , supplierid = vendorid , commodityname . select [part revenue exposed query p1].divisionname, [part revenue exposed query p1].commodityname, [part revenue exposed query p1].suppliername, [part revenue exposed query p1].partnumber, [part revenue exposed query p1].partdescription, [part revenue exposed query p1].bucode,

php - Cannot create local copy of Magento -

i'm trying create copy of existing magento website on localhost developing purposes. i followed steps listed here: copy ec2 files local i created fake domain localhost there’s “.” in read somewhere required magento. localhost fake url like: www.mysite.local i have xampp installed on os x 10.9.1 , placed magento filesystem follows: /applications/xampp/xamppfiles/htdocs/magento/ in database added local url follows: update core_config_data set value = ‘http://www.mysite.local/’ config_id = 6; and on local.xml entered following parameters: <host><![cdata[localhost]]></host> <username><![cdata[myusername]]></username> <password><![cdata[mypassword]]></password> <dbname><![cdata[mydatabase]]></dbname> where localhost localhost, myusername username db restored on local xampp server, mypassword password same db, mydatabase name of same db. still, when browse www.mysite.local/magento/ or www.

c# - OpenXML hanging while writing elements -

Image
i have program pulls data database, caches file , exports data multiple formats (excel, excel 2003, csv). i'm using openxml sdk 2.0 excel work. these export processes run in parallel (using parallel.foreach ), , amount of data can pretty large - e.g. csvs 800mb. during these larger exports, i've noticed writing of xml documents hang. instance, if have 8 exporting in parallel, @ point "pause". hang around same point: //this.writer openxmlwriter created worksheetpart. this.writer.writeelement(new cell() { cellvalue = new cellvalue(value), datatype = cellvalues.string }); when happens, pause debugger (vs2013 in case) , notice threads blocking around same portion of code - bit deeper in openxml sdk - stem call openxmlwriter.writeelement . i dug through source using justdecompile didn't find answers. appears there intermediary stream in use writing isolated storage , is, reason, blocking. underlying stream each of these filestream . here screenshot

c# - Can I convert a My.Resources file into a Properties.Resources file -

i have existing my.resources file, convert properties.resources file. wouldn't want hand (that ugly). there tool out there capable of doing that? the my.resources type standard .resx file exists in project. same format c# uses , can copied directly 1 project other. the .resx file under my project folder of project. easiest way import on to right click on c# project add -> existing item navigate vb.net .resx file , select it

tomcat - java.lang.IllegalArgumentException: Document base [...]org.eclipse.wst.server.core\tmp0\wtpwebapps[...] does not exist or is not a readable directory -

i getting exception in eclipse-jee-kepler-sr1-win32 java.lang.illegalargumentexception: document base c:\users\praveen\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\advanced java not exist or not readable directory @ org.apache.naming.resources.filedircontext.setdocbase(filedircontext.java:138) @ org.apache.catalina.core.standardcontext.resourcesstart(standardcontext.java:5077) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5257) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1559) @ org.apache.catalina.core.containerbase$startchild.call(containerbase.java:1549) @ java.util.concurrent.futuretask.run(unknown source) @ java.util.concurrent.threadpoolexecutor.runworker(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) @ java.lang.thread.run(unknown sourc

c# - MaxLength="255" property does not seem to be working? -

this question has answer here: specifying maxlength multiline textbox 14 answers i have textbox field maxlength set 255. can enter more 255 characters in textbox. expecting there 255 character limit.is there way control this? need use code behind? can control requiredfieldvalidator? here code in .aspx <asp:textbox id="txtcommentaire" runat="server" width="600px" maxlength="255" textmode="multiline" height="90px" style="overflow:hidden" ></asp:textbox> maxlength doesn't apply when have textmode="multiline". when use <asp:textbox textmode="multiline"> , <textarea> rendered page. textarea tags didn't support maxlength attribute until (html5). therefore, when feature designed, microsoft ignored maxlength attribute in multiline mod