Search Results

Search found 1821 results on 73 pages for 'converted'.

Page 3/73 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • FileHelpers cannot map converted field into destination array

    - by jaffa
    I have the following record (reduced for brevity): [DelimitedRecord(",")] [IgnoreFirst] [IgnoreEmptyLines()] public class ImportRecord { [FieldQuoted] [FieldTrim(TrimMode.Both)] public string FirstName; [FieldQuoted] [FieldTrim(TrimMode.Both)] public string LastName; [FieldQuoted] [FieldTrim(TrimMode.Both)] [FieldOptional] [FieldConverter(typeof(TestPropertyConverter))] public int[] TestProperty; } Converter code: public class TestPropertyConverter : ConverterBase { public override object StringToField(string from) { var ret = from.Split('|').Select(x => Convert.ToInt32(x)).ToArray(); return ret; } } So an example record could be: John, Smith, 1|2|3|4 It would expect the values 1,2,3,4 to expand and fill the TestProperty array. However, I'm getting the following exception: At least one element in the source array could not be cast down to the destination array type. I've tried to debug into the code and it seems to blow-up in the ExtractFieldValue() function inside FieldBase.cs where it tries to return out of the function. The following line seems to be the culprit: res.ToArray(ArrayType); It seems to expect the 'res' variable to be the destination type array, but it contains 1 element of the array itself. Can anyone suggest if I'm doing this wrong or a possible fix?

    Read the article

  • Cannot display converted value inside xml field

    - by zurna
    PS: My bad, there was not an error. I forgot to upload the latest version to the server... I have multimedias and images table. I save images in multimedias table with their images table id numbers. Then whenever I need image's url, with a simple function I get it from images table. The problem I am having is when I try to display image's url inside ImageURL, it just does not happen. This is very annoying. xml output <?xml version='1.0' encoding='windows-1254' ?> <rows><row id='1'> <MultimediaTitle>Hagi Goals</MultimediaTitle> /FLPM/media/images/5Y2K4T5V_sm.jpg <ImageURL><![CDATA[]]></ImageURL> <Videos> <VideoID id='1'><VideoURL>/FLPM/media/videos/0H7T9C0F.flv</VideoURL></VideoID> <VideoID id='2'><VideoURL>/FLPM/media/videos/9L6X9G9J.flv</VideoURL></VideoID> </Videos> </row> </rows>

    Read the article

  • Trouble echoing data - data being converted to 0

    - by Haraldo
    Hi, I feel this is something to do with my httpd setup for apache. I'm using mod_rewrite if that helps but I think that only effects the url. It seems when I output some data such as: $sMessage = 'Error'; echo $sMessage; It works fine but when I do this: $sMessage = 'Error'; echo ''+$sMessage+''; It returns 0. Very odd!

    Read the article

  • How to keep format within HTML converted to Excel

    - by pojomx
    Hello, I'm working with an HTML table, that contains numbers (formated) and when I export this to xls file (just change extension... hehe) I loss some of the formated data. Example: in html I have " 1,000.00 | 500.00 | 20.00 " and in excel it shows like: "1,000.00 | 500 | 20" I want it to know if it is possible to show the very same format as in html. THankyou :P

    Read the article

  • POST method getting converted to GET in IE-9

    - by Sri127
    I have this line of code in my JSP. (I'm using struts 1.3) <html:form action="screening/mine.do" method="post"> . . . </html:form When the action corresponding to mine.do is invoked (using struts-config.xml), the page is getting submitted as GET instead of POST. All the request parameters including the required ones are getting lost due to this. This issue occcurs only in IE-9. The response remains as POST when I use other versions of IE or any other browsers. How do I make the response to remain as POST in IE-9 ? EDIT : I observed one more issue in this. Whenever the page is rendered in a new window, this issue occurs. Other places, the POST works fine in IE-9. Also, this issue occurs in Win7/IE-8, but works absolutely fine in XP/IE-8. Is there something to do with the OS as well??? Any solutions would be useful. Thanks!!

    Read the article

  • Converted PHP query to PDO and now getting no results

    - by jaw
    I had a query working just fine, but after converting it to PDO I am getting no results when I do a var_dump($row). But there are no error messages. Can anyone see what I might be doing wrong? //Here is the original query that worked fine and returned results global $wpdb; $results = $wpdb->get_results("SELECT stories.story_name, stories.category, stories.SID, wp_users.ID, wp_users.display_name FROM stories LEFT JOIN wp_users ON stories.ID=wp_users.ID where stories.active = 1"); //Here is the query in PDO form which returns no results $results = $dbh->prepare("select wp_users.ID, wp_users.display_name, stories.SID, stories.story_name, stories.category, FROM stories LEFT JOIN wp_users ON stories.ID=wp_users.ID WHERE stories.active=1"); $results->bindParam(':wp_users.ID', $user_ID, PDO::PARAM_INT); $results->bindParam(':display_name', $display_name, PDO::PARAM_STR); $results->bindParam(':stories.SID', $SID, PDO::PARAM_INT); $results->bindParam(':story_name', $story_name, PDO::PARAM_STR); $results->bindParam(':category', $category, PDO::PARAM_STR); $results->execute(); $row = $results->fetchAll(PDO::FETCH_ASSOC); //returns 0 results but should return 8 as original code above did echo var_dump($row);

    Read the article

  • Field name being converted in Unit Tests [rails]?

    - by yar
    I am noting this strange behavior where one of my fields -- receive_empresa_test_info -- has worked fine though it's always been referred to as receive_empresa_info. In Functional Tests, though, the real field name is receive_empresa_test_info. What is going on here? Might this be some part of the Rails environment that I'm missing during testing?

    Read the article

  • can list be converted into string

    - by PARIJAT
    Actually i have extracted some data from the file and want to write it in the file 2 but the program says 'sequence item 1: expected string, list found', I want to know how i can convert buffer[] ie string into sequence, so that it could be saved in file 2...I am new to the python please help* file = open('/ddfs/user/data/k/ktrip_01/hmm.txt','r') file2 = open('/ddfs/user/data/k/ktrip_01/hmm_write.txt','w') buffer = [] rec = file.readlines() for line in rec : field = line.split() print '>',field[0] term = field[0] buffer.append(term) print field[1], field[2], field[6], field[12] term1 = field [1] buffer.append(term1) term2 = field[2] buffer.append[term2] term3 = field[6] buffer.append[term3] term4 = field[12] buffer.append[term4] file2.write(buffer) file.close() file2.close()

    Read the article

  • Can GMod/SFM models be converted to Unity GameObjects?

    - by Supuhstar
    Someone made a suite of GMod/SFM models available for free for people making games and videos in GMod and SFM. These are of type .dmx, .dx80.vtx, .dx90.vtx, .mdl, .phy, .sw.vtx, .vvd, .vmt, and .vtf. I fon't use GMod or SFM, so I don't know what these are, thus making it hard for me to manually convert them. Is there any way to change these into files Unity can recognize and use? I'd like to have an easy step from converting them, but I would also accept instructions on how to export them to generic mesh/skeleton/texture files, and then how to import and combine these in Unity.

    Read the article

  • Analytics - how to tell where converted traffic came from?

    - by Eric
    I must be missing something obvious. I have Analytics set up with conversion tracking (goals), and I had 4 customers complete the goals yesterday. I'm trying to find out where those 4 customers came from (organic search? if organic, what keywords? etc) but I can't figure out how to do that in Adwords. When I click into the goal tracking overview, I see my 4 customers and it breaks it down so I see that 3 of them came from adwords (cpc) and 1 of them came from organic. I'd like to know exactly what ads brought the traffic and what keywords on the organic search led them to me. How can I do this? It seems like a simple request... but I can't figure it out... thanks for your help!

    Read the article

  • Removing "Transfer To..." and "Show Converted Files" from uTorrent's context menu

    - by kotekzot
    Under uTorrent version 3.1.3 (and possibly earlier), the context menu has taken on 2 new options, "Transfer To...", for moving a download to a mobile device, and "Show Converted Files", for built-in conversion. I prefer to do all my file management and conversions manually, and the options are, at best, annoying space wasters. In fact, I'm not sure these features are even available outside of uTorrent Plus, which is not something I run. Is it possible to remove them from the context menu?

    Read the article

  • How can I recover a huge folder that's been converted to a zero kb file on an NTFS partition?

    - by aalaap
    I have a 1TB drive with two 500GB partitions. One of them is being used as a Mac OS X Time Machine back up drive and the other one was NTFS and being used for storage. I had my entire 'iTunes Music' folder stored on it. Recently, there were some errors on the NTFS drive that caused chkdsk to run when in Windows, and it removed a lot of corrupt files. In this process, it converted my 'iTunes Music' folder into one zero KB file. How can I recover this? The partitions are intact and the other data on the disk is still accessible. It's just the 'iTunes Music' folder that's gone.

    Read the article

  • I recently converted my ex HDD from FAT32 to NTFS. now my pc doesn't find or pick up my NTFS HDD

    - by Jason Haniball
    I recently converted my external hard drive from FAT32 to NTFS using the Command Prompt. Everything was working fine, I copied a 7GB file to it and everything worked. The next day I switched on my PC, I couldn't and still can't find my external 1.5TB hard drive by my computer. I have about 500 to 800 GB of data on it that I really don't want to lose. Its a Iomega Seagate Freeagent HDD. Has no switch, it switched on automatically, don't know if that helps.

    Read the article

  • Object of type 'customObject' cannot be converted to type 'customObject'.

    - by Phani Kumar PV
    i am receiving the follwing error when i am invoking a custom object "Object of type 'customObject' cannot be converted to type 'customObject'." Following is the scenario when i am getting the error i am invoking a method in a dll dynamically. Load an assembly CreateInstance.... calling MethodInfo.Invoke() passing int, string as a parameter for my method is working fine = No exceptions are thrown. But if I try and pass a one of my own custom class objects as a parameter, then I get an ArgumentException exception, and it is not either an ArgumentOutOfRangeException or ArgumentNullException. "Object of type 'customObject' cannot be converted to type 'customObject'." I am doing this in a web application. The class file containing the method is in a different proj . also the custom object is a sepearte class in the same file. there is no such thing called a static aseembly in my code. I am trying to invoke a webmethod dynamically. this webmethod is having the customObject type as an input parameter. So when i invoke the webmethod i am dynamically creating the proxy assembly and all. From the same assembly i am trying to create an instance of the cusotm object assinging the values to its properties and then passing this object as a parameter and invoking the method. everything is dynamic and nothing is created static.. :( add reference is not used. Following is a sample code i tried to create it public static object CallWebService(string webServiceAsmxUrl, string serviceName, string methodName, object[] args) { System.Net.WebClient client = new System.Net.WebClient(); //-Connect To the web service using (System.IO.Stream stream = client.OpenRead(webServiceAsmxUrl + "?wsdl")) { //--Now read the WSDL file describing a service. ServiceDescription description = ServiceDescription.Read(stream); ///// LOAD THE DOM ///////// //--Initialize a service description importer. ServiceDescriptionImporter importer = new ServiceDescriptionImporter(); importer.ProtocolName = "Soap12"; // Use SOAP 1.2. importer.AddServiceDescription(description, null, null); //--Generate a proxy client. importer.Style = ServiceDescriptionImportStyle.Client; //--Generate properties to represent primitive values. importer.CodeGenerationOptions = System.Xml.Serialization.CodeGenerationOptions.GenerateProperties; //--Initialize a Code-DOM tree into which we will import the service. CodeNamespace nmspace = new CodeNamespace(); CodeCompileUnit unit1 = new CodeCompileUnit(); unit1.Namespaces.Add(nmspace); //--Import the service into the Code-DOM tree. This creates proxy code //--that uses the service. ServiceDescriptionImportWarnings warning = importer.Import(nmspace, unit1); if (warning == 0) //--If zero then we are good to go { //--Generate the proxy code CodeDomProvider provider1 = CodeDomProvider.CreateProvider("CSharp"); //--Compile the assembly proxy with the appropriate references string[] assemblyReferences = new string[5] { "System.dll", "System.Web.Services.dll", "System.Web.dll", "System.Xml.dll", "System.Data.dll" }; CompilerParameters parms = new CompilerParameters(assemblyReferences); CompilerResults results = provider1.CompileAssemblyFromDom(parms, unit1); //-Check For Errors if (results.Errors.Count > 0) { StringBuilder sb = new StringBuilder(); foreach (CompilerError oops in results.Errors) { sb.AppendLine("========Compiler error============"); sb.AppendLine(oops.ErrorText); } throw new System.ApplicationException("Compile Error Occured calling webservice. " + sb.ToString()); } //--Finally, Invoke the web service method Type foundType = null; Type[] types = results.CompiledAssembly.GetTypes(); foreach (Type type in types) { if (type.BaseType == typeof(System.Web.Services.Protocols.SoapHttpClientProtocol)) { Console.WriteLine(type.ToString()); foundType = type; } } object wsvcClass = results.CompiledAssembly.CreateInstance(foundType.ToString()); MethodInfo mi = wsvcClass.GetType().GetMethod(methodName); return mi.Invoke(wsvcClass, args); } else { return null; } } } I cant find anything static being done by me. any help is greatly appreciated. Regards, Phani Kumar PV

    Read the article

  • the characters except 0x00-0x7F are not been shown when converted to "UTF-8" from "ISO-8859-1"

    - by Mike.Huang
    I need to get a string from URL request of brower, and then create a text image by requested text. I know the default encoding of the Java net transmission is "ISO-8859-1", it can works normally with all characters what defined in "ISO-8859-1". But when I request a multi-byte Unicode character (e.g. chinese or something like ¤?), then I need to decode it by "UTF-8" from "ISO-8859-1". My codes like: String reslut = new String(requestString.getBytes("ISO-8859-1"), "UTF-8"); Everything is fine, but I found some characters in ISO-8859-1 are not been shown now, which characters are 0x80 - 0xFF(defined in" ISO-8859-1"), i.e. the characters except 0x00-0x7F are not been shown when converted to "UTF-8" from "ISO-8859-1" Any other method can solve this query?

    Read the article

  • GQL: I'm storing JSON in the DataStore. All json is getting converted to html entities, how to avoid

    - by fmsf
    The tittle says most: I'm storing JSON in the DataStore. All json is getting converted to html entities, how can I avoid this? Original I had myJson = db.StringProperty() it complained the json i had was to long and StringProperty had a limit of around 500 chars. Sugesting to use TextProperty instead. It inserted without problems but now myJson looks like this when i fetch it from the database: { &quot;timeUnit&quot;: &quot;14&quot;, &quot;taskCounter&quot;: &quot;0&quot;, &quot;dependencyCounter&quot;: &quot;0&quot;, &quot;tasks&quot;: [], &quot;dependencies&quot;: []} Any sugestions?

    Read the article

  • Why is this std::bind not converted to std::function?

    - by dauphic
    Why is the nested std::bind in the below code not implicitly converted to an std::function<void()> by any of the major compilers (VS2010/2012, gcc, clang)? Is this standard behavior, or a bug? #include <functional> void bar(int, std::function<void()>) { } void foo() { } int main() { std::function<void(int, std::function<void()>)> func; func = std::bind(bar, 5, std::bind(foo)); std::cin.get(); return 0; }

    Read the article

  • I (stupidly) converted a TrueCrypt encrypted disk to GPT in Disk Management: now TrueCrypt won't mount it

    - by asilentfire
    Backstory: After moving a Macrium Reflect disk image from my TrueCrypt external drive (with whole disk encryption) onto a unencrypted drive and using Windows PE with Macrium Reflect to restore my internal disk to the recovery image on the external unencrypted drive, my Windows 8 failed to boot. I then went back and also recovered the System Partition (looking now, it is currently EFI), but I still couldn't boot into my backup.. I was in a hurry to get online for something so I just did a clean install of Windows 8, without the backup.. After I installed Windows 8, I went into Disk Management out of curiosity to see if there were other partitions with Windows 8 that Macruim might have missed, and there is (by default) a Recovery Partition of 100MB. My memory of this is hazy, as I was trying to get up and running for an exam at 4 AM: Something in Disk Management prompted me to convert my encrypted external drive to GPT.. I have no idea why I did this, but I went ahead and allowed it to convert my TrueCrypt drive to GPT. Now, I can't mount the drive in TrueCrypt.. Disk Management sees it as Disk 1, Basic, and Unallocated. I tried converting it back to MBR with Disk Management, but no dice with TrueCrypt :( If I try to mount the disk in TrueCrypt I get the message: Incorrect password or not a TrueCrypt volume I should never have messed with a Truecrypt drive in Disk Management, but I did. I have important college work in that drive, and fear I have lost it forever. PLEASE HELP

    Read the article

  • how to bind the converted value from a datatable to my gridview.

    - by Ranjana
    how to bind the value to gridview i have a datatable DataTable dtBindGrid = new DataTable(); dtBindGrid = serviceobj.SelectExamTimeTable(txtSchoolName.Text, txtBranchName.Text, txtClass.Text, txtExamName.Text); foreach (DataRow row in dtBindGrid.Rows) { strgetday= row["Day"].ToString(); strgetdate = row["Date"].ToString(); DatedTime = Convert.ToDateTime(row["Time"].ToString()); strgettime = DatedTime.ToString("t"); strgetsubject = row["Subject"].ToString(); strgetduration = row["Duration"].ToString(); strgetsession = row["Session"].ToString(); strgetminmark = row["MinMarks"].ToString(); strgetmaxmark = row["MaxMarks"].ToString(); // dtBindGrid.Rows.Add(row); } GrdExamTimeTable.DataSource = dtBindGrid.DefaultView; GrdExamTimeTable.DataBind(); this datatable will return me some values like day,date,time,duration,subject,.. here im getting each value in string bec to convert the Time as 9.00am or 9.00pm DatedTime = Convert.ToDateTime(row["Time"].ToString()); strgettime = DatedTime.ToString("t"); .... how to bind this converted value to my gridview.

    Read the article

  • Why is my PHP string being converted to 1?

    - by animuson
    Ok, so here's the quick rundown. I have a function to generate the page numbers. This: <?php die($ani->e->tmpl->pages("/archive", 1, 15, 1, true)); ?> will output Single Page like expected. But this: <?php $page_numbers = $ani->e->tmpl->pages("/archive", 1, 15, 1, true); ?> <?= $page_numbers ?> will output a simple 1 to the page. Why is it getting converted to a 1? I would expect it to store the 'Single Page' string to the page_numbers variable and then output it (like an echo) exactly the same. EDIT: Running a var_dump($page_numbers) returns int(1)... Here is the entire function in context: <?php // other functions... function show_list() { global $ani; $page_numbers = $ani->e->tmpl->pages("/archive", 1, 15, 1, true); ob_start(); ?> <!-- content:start --> <?php $archive_result = $ani->e->db->build(array("select" => "*", "from" => "animuson_archive", "orderby" => "0-time", "limit" => 15)); while ($archive = $ani->e->db->fetch($archive_result)) { ?> <h2><a href="/archive/article/<?= $archive['aid'] ?>/<?= $archive['title_nice'] ?>"><?= $archive['title'] ?></a></h2> <!-- breaker --> <?php } ?> <?= var_dump($page_numbers) ?> <!-- content:stop --> <?php $ani->e->tmpl->process("box", ob_get_clean()); } // other functions... ?>

    Read the article

  • Length-1 arrays can be converted to python scalars error? python

    - by Randy
    from numpy import * from pylab import * from math import * def LogisticMap(a,x): return 4.*a*x*(1.-x) def CosineMap(a,x): return a*cos(x/(2.*pi)) def TentMap(a,x): if x>= 0 or x<0.5: return 2.*a*x if x>=0.5 or x<=1.: return 2.*a*(1.-x) a = 0.98 N = 40 xaxis = arange(0.0,N,1.0) Func = CosineMap subplot(211) title(str(Func.func_name) + ' at a=%g and its second iterate' %a) ylabel('X(n+1)') # set y-axis label plot(xaxis,Func(a,xaxis), 'g', antialiased=True) subplot(212) ylabel('X(n+1)') # set y-axis label xlabel('X(n)') # set x-axis label plot(xaxis,Func(a,Func(a,xaxis)), 'bo', antialiased=True) My program is supposed to take any of the three defined functions and plot it. They all take in a value x from the array xaxis from 0 to N and then return the value. I want it to plot a graph of xaxis vs f(xaxis) with f being any of the three above functions. The logisticmap function works fine, but for CosineMap i get the error "only length-1 arrays can be converted to python scalars" and for TentMap i get error "The truth value of an array with more than one element is ambiguous, use a.any() or a.all()". My tent map function is suppose to return 2*a*x if 0<=x<0.5 and it's suppose to return 2*a*(1-x) if 0.5<=0<=1.

    Read the article

  • FBX SDK Not Converting Child Node Coordinate Systems

    - by Al Bundy
    I am trying to import a scene into my application from an fbx file. In 3DS Max, the scene and it’s local translations are as follows: Root (0, 0, 0) '-Sphere001 (-15, 30, 0) ' '-Sphere002 (-2, -30, 0) ' '-Sphere003 (-30, -20, 0) '-Cube001 (35, -15, 0) This is the code that I am using to get the translations of each node: FbxDouble3 fbxPosition = pChild->LclTranslation.Get(); FbxDouble3 fbxRotation = pChild->LclRotation.Get(); FbxDouble3 fbxScale = pChild->LclScaling.Get(); When I try to import the scene, the first node from the scene is getting converted to a right handed system, using this conversion: (X, Z, -Y), but none of their child nodes are. after importing the scene, the local translations I get are as follows: Root (0, 0, 0) --Sphere001 (-15, 0, -30) - converted ----Sphere002 (-2, -30, 0) - not converted ------Sphere003 (-30, -20, 0) - not converted --Cube001 (35, 0, 15) - converted Can anybody help me make sense of this? Thanks

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >