Search Results

Search found 572 results on 23 pages for 'christian l'.

Page 11/23 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Unicode replacement characters for text matching

    - by Christian Harms
    I have some fun with unicode text sources (all correct encodet) and I want to match names. The classic problem, one source comes correctly, an other has more flatten names: "Elblag" vs. "Elblag" (see the character a) How can I "flatten" a, á, â or à to a for better matching? Are there unicode to ascii- matching tables?

    Read the article

  • WebPage resize on HD Devices like Nexus One

    - by christian Muller
    Hi, our Webpage: http://www.checkdent.com/mobile/sv.php?id=12332181087788749 looks fine on Android G1, but comes resized on the Google Nexus (higher resolution) Half part of the Page is outside of the View! I implemented as mentioned at several places the: target-densityDpi=device-dpi < meta content="minimum-scale=1.0, width=device-width, , target- densityDpi=device-dpi, maximum-scale=0.6667, user-scalable=no" name="viewport" / it works great within the 'android browser' but in my Webview Application it still resize!! What can i Do? Regards Chris

    Read the article

  • MySQL GROUP BY and JOIN

    - by christian
    Guys what's wrong with this SQL query: $sql = "SELECT res.Age, res.Gender, answer.*, $get_sum, SUM(CASE WHEN res.Gender='Male' THEN 1 else 0 END) AS males, SUM(CASE WHEN res.Gender='Female' THEN 1 else 0 END) AS females FROM Respondents AS res INNER JOIN Answers as answer ON answer.RespondentID=res.RespondentID INNER JOIN Questions as question ON answer.Answer=question.id WHERE answer.Question='Q1' GROUP BY res.Age ORDER BY res.Age ASC"; the $get_sum is an array of sql statement derived from another table: $sum[]= "SUM(CASE WHEN answer.Answer=".$db->f("id")." THEN 1 else 0 END) AS item".$db->f("id"); $get_sum = implode(', ', $sum); the query above return these values: Age: 20 item1 0 item2 1 item3 1 item4 1 item5 0 item6 0 Subtotal for Age 20 3 Age: 24 item1 2 item2 2 item3 2 item4 2 item5 1 item6 0 Subtotal for Age 24 9 It should return: Subtotal for Age 20 1 Subtotal for Age 24 2 In my sample data there are 3 respondents 2 are 24 yrs of age and the other one is 20 years old.

    Read the article

  • Reporting on data when data is missing (ie. how to report zero activities for a customer on a given

    - by Christian Vik
    I want to create a report which aggregates the number of activities per customer per week. If there has been no activites on that customer for a given week, 0 should be displayed (i.e week 3 and 4 in the sample below) CUSTOMER | #ACTIVITIES | WEEKNUMBER A | 4 | 1 A | 2 | 2 A | 0 | 3 A | 0 | 4 A | 1 | 5 B ... C ... The problem is that if there are no activities there is no data to report on and therefor week 3 and 4 in the sample below is not in the report. What is the "best" way to solve this?

    Read the article

  • Save matrix of double values in OpenCV

    - by Christian
    I have an OpenCV matrix of double (CV_32F) values. I'd like to save it to the disk. I know, I could convert it to an 1-Channel 8-bit IplImage and save it. But that way, I loose precision. Is there a way to save it directly in the 32-bit format, without having to convert it first? It also would be nice, if the resulting file would have an image format, so I can view the result as an image.

    Read the article

  • C# - How to override GetHashCode with Lists in object

    - by Christian
    Hi, I am trying to create a "KeySet" to modify UIElement behaviour. The idea is to create a special function if, eg. the user clicks on an element while holding a. Or ctrl+a. My approach so far, first lets create a container for all possible modifiers. If I would simply allow a single key, it would be no problem. I could use a simple Dictionary, with Dictionary<Keys, Action> _specialActionList If the dictionary is empty, use the default action. If there are entries, check what action to use depending on current pressed keys And if I wasn't greedy, that would be it... Now of course, I want more. I want to allow multiple keys or modifiers. So I created a wrapper class, wich can be used as Key to my dictionary. There is an obvious problem when using a more complex class. Currently two different instances would create two different key, and thereby he would never find my function (see code to understand, really obvious) Now I checked this post: http://stackoverflow.com/questions/638761/c-gethashcode-override-of-object-containing-generic-array which helped a little. But my question is, is my basic design for the class ok. Should I use a hashset to store the modifier and normal keyboardkeys (instead of Lists). And If so, how would the GetHashCode function look like? I know, its a lot of code to write (boring hash functions), some tips would be sufficient to get me started. Will post tryouts here... And here comes the code so far, the Test obviously fails... public class KeyModifierSet { private readonly List<Key> _keys = new List<Key>(); private readonly List<ModifierKeys> _modifierKeys = new List<ModifierKeys>(); private static readonly Dictionary<KeyModifierSet, Action> _testDict = new Dictionary<KeyModifierSet, Action>(); public static void Test() { _testDict.Add(new KeyModifierSet(Key.A), () => Debug.WriteLine("nothing")); if (!_testDict.ContainsKey(new KeyModifierSet(Key.A))) throw new Exception("Not done yet, help :-)"); } public KeyModifierSet(IEnumerable<Key> keys, IEnumerable<ModifierKeys> modifierKeys) { foreach (var key in keys) _keys.Add(key); foreach (var key in modifierKeys) _modifierKeys.Add(key); } public KeyModifierSet(Key key, ModifierKeys modifierKey) { _keys.Add(key); _modifierKeys.Add(modifierKey); } public KeyModifierSet(Key key) { _keys.Add(key); } }

    Read the article

  • CSV string handling

    - by Christian Hagelid
    Typical way of creating a CSV string (pseudocode): create a CSV container object (like a StringBuilder in C#) Loop through the strings you want to add appending a comma after each one After the loop, remove that last superfluous comma. Code sample: public string ReturnAsCSV(ContactList contactList) { StringBuilder sb = new StringBuilder(); foreach (Contact c in contactList) { sb.Append(c.Name + ","); } sb.Remove(sb.Length - 1, 1); //sb.Replace(",", "", sb.Length - 1, 1) return sb.ToString(); } I feel that there should be an easier / cleaner / more efficient way of removing that last comma. Any ideas? Update I like the idea of adding the comma by checking if the container is empty, but doesn't that mean more processing as it needs to check the length of the string on each occurrence?

    Read the article

  • Why does IE8 change flash callback function into object?

    - by Christian Hollbaum
    Hi Guys I have put 2 swf's (using swfobject 2) on the same website; One for playing a movie, and one for controlling the movie (I want to position them seperately, so they can't be in the same swf). I'm doing the communication between the two using javascript with jQuery, and externalcallback functions in both swf's. Everything is running smoothly on all browsers, but IE8. In IE8 I can only call the pause callback function in the control swf once. When it has been called it will not run properly the next time. After trying to debug what is happening live, using javascript's "type of" I have found that IE8 changes the callback function on the flash object from a function into an object when it has been triggered. Can anyone explain why this is happening? .. and maybe suggest how to avoid this? .. or change the object back to a function?

    Read the article

  • Strange error with VS2008 on Windows 7

    - by Christian
    We have a solution with two projects, one of them is a Silverlight 3 application which is embedded on the other ASP.NET MVC project. Just recently an error started to appear which makes the build fail. Here is the output: `------ Build started: Project: DotCoquiMap, Configuration: Debug Any CPU ------ C:\Program Files\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Ria.Client.targets : warning : Could not find necessary input file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll'. Done building project "DotCoquiMap.csproj" -- FAILED. ------ Build started: Project: DotCoquiProject, Configuration: Debug Any CPU ------ C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll /reference:..\ExternalLibraries\itextsharp.dll /reference:..\ExternalLibraries\MvcMembership.dll /reference:..\ExternalLibraries\PagedList.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Configuration.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.Linq.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Abstractions.dll" /reference:............\Windows\assembly\GAC_MSIL\System.Web.DataVisualization\3.5.0.0__31bf3856ad364e35\System.Web.DataVisualization.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /reference:"C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 1.0\Assemblies\System.Web.Mvc.dll" /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Routing.dll" /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /debug+ /debug:full /optimize- /out:obj\Debug\DotCoquiProject.dll /target:library Controllers\AccountController.cs Controllers\AdministrationController.cs Controllers\ApiController.cs Controllers\CampaignsCategoriesController.cs Controllers\CampaignsController.cs Controllers\CampaignsFormViewModel.cs Controllers\CampaignStatisticsController.cs Controllers\CampaignStatisticsDetailsViewModel.cs Controllers\ControllerHelpers.cs Controllers\CountriesController.cs Controllers\ErrorController.cs Controllers\HomeController.cs Controllers\MapController.cs Controllers\MediaController.cs Controllers\MediaViewModel.cs Controllers\NewsController.cs Controllers\OrganizationsController.cs Controllers\OrgCenterController.cs Controllers\UserAdministrationController.cs Default.aspx.cs Global.asax.cs Models\Campaigns.cs Models\CategoriesRuleValidation.cs Models\DotCoquiDBModel.designer.cs Models\DotCoquiRepository.cs Models\DQcodes.cs Models\FileRepository.cs Models\ISmtpClient.cs Models\JsonModels.cs Models\OrgCenter\IndexViewModel.cs Models\SmtpClientProxy.cs Models\Statistic.cs Models\User.cs Models\UserAdministration\DetailsViewModel.cs Models\UserAdministration\IndexViewModel.cs Models\UserAdministration\RoleViewModel.cs Properties\AssemblyInfo.cs error CS0006: Metadata file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll' could not be found Compile complete -- 1 errors, 0 warnings ========== Build: 0 succeeded or up-to-date, 2 failed, 0 skipped ==========` And here is the errors / warnings: Warning 2 Could not find necessary input file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll'. DotCoquiMap Error 1 Metadata file 'C:\Users\Michael\Documents\DotCoqui\trunk\DotCoquiMap\Bin\Debug\DotCoquiMap.dll' could not be found DotCoquiProject The DotCoquiMap is not getting built therefore the DotCoquiProject (ASP.NET MVC) cannot find the .dll. Now here is the really odd thing, under Windows XP the very same code compiles and runs perfectly.... under windows 7 it gives us these errors. It is the very same code, we have tested it on 3 different Win7 machines to no avail. Help will be really really helpful. Thanks in advance.

    Read the article

  • Unity Register two interfaces as one singleton

    - by Christian
    Hi all, how do I register two different interfaces in Unity with the same instance... Currently I am using _container.RegisterType<EventService, EventService>(new ContainerControlledLifetimeManager()); _container.RegisterInstance<IEventService>(_container.Resolve<EventService>()); _container.RegisterInstance<IEventServiceInformation>(_container.Resolve<EventService>()); which works, but does not look nice.. So, I think you get the idea. EventService implements two interfaces, I want a reference to the same object if I resolve the interfaces. Chris

    Read the article

  • Accessing children with a given name via jdom

    - by Christian
    I want to access the children with skos:Concept. getChildren("skos:Concept") and getChildren("Concept") both give me an empty list what should I use instead?. My example Data: <owl:AnnotationProperty rdf:about="&dc;identifier"/> <owl:ObjectProperty rdf:about="&skos;narrower"/> <skos:Concept rdf:about="#concept:0_acetylpantolactone:4253501"> <skos:prefLabel xml:lang="" >0-acetylpantolactone</skos:prefLabel> <skos:hiddenLabel xml:lang="" >2(3H)-Furanone, 3-(acetyloxy)dihydro-4,4-dimethyl-, (R)-</skos:hiddenLabel> <dc:identifier rdf:resource="urn:CHID:028227363"/> <dc:identifier rdf:resource="urn:MESH:C014305"/> </skos:Concept> <skos:Concept rdf:about="#concept:1012S:4202655"> <skos:prefLabel xml:lang="">1012S</skos:prefLabel> <skos:hiddenLabel xml:lang="" >C19-H16-Cl2-N6-O</skos:hiddenLabel> <skos:hiddenLabel xml:lang="">Compound 1012S</skos:hiddenLabel> <dc:identifier rdf:resource="urn:CAS:95211_91_9"/> <dc:identifier rdf:resource="urn:CHID:095211919"/> </skos:Concept>

    Read the article

  • Multidimensional Array with different types in java

    - by Christian
    I want to store a data structure thats a table with one column Strings and another column of Ints. List<Entry<String, Integer>> li = new LinkedList<Entry<String, Integer>>(); would do the job for a list but I would rather have the performance of an array. I tried Entry<String, Integer>[] = new Entry<String, Integer>[10]; but that doesn't seem to work.

    Read the article

  • Calculations in a table of data

    - by Christian W
    I have a table of data with survey results, and I want to do certain calculations on this data. The datastructure is somewhat like this: ____________________________________________________________________________________ | group |individual | key | key | key | | | |subkey|subkey|subkey|subkey|subkey|subkey|subkey|subkey|subkey| | | |q|q|q |q |q |q|q|q |q|q|q |q |q |q|q|q |q|q|q |q |q |q|q|q | |-------|-----------|-|-|--|--|---|-|-|--|-|-|--|--|---|-|-|--|-|-|--|--|---|-|-|--| | 1 | 0001 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | | 1 | 0002 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | | 1 | 0003 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | | 2 | 0004 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | | 2 | 0005 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | | 3 | 0006 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | | 4 | 0007 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 |1|7|5 |1 |3 |1|4|1 | ------------------------------------------------------------------------------------ Excuse my poor ascii skills... So, every individual belongs to a group, and has answered some questions. These questions are always grouped in keys and subkeys. Is there any simple method to calculate averages, deviations and similar based on the groupings. Something like public float getAverage(int key, int individual); float avg = getAverage(5,7); I think what I'm asking is what would be the best way to structure the data in C# to make it as easy as possible to work with? I have started making classes for every entity, but I got confused somewhere and something stopped working. So before I continue along this path, I was wondering if there are any other, better, ways of doing this? (Every individual can also have describing variables, like agegroup and such, but that's not important for the base functionality.) Our current solution does all calculations inline in the queries when requesting the data from the database. This works, but it's slow and the number of queries equals questions * individuals + keys * individuals, which could be alot if individual queries. Any suggestions?

    Read the article

  • Using FTP from PHP CURL

    - by Christian Sciberras
    I can't figure out how to use CURL's FTP, specifically, how to issue FTP commands from my PHP code: <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'ftp://ftp.microsoft.com/'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch,CURLOPT_POSTQUOTE,array('CWD bussys/','LIST')); /* ?!! */ echo '<hr><pre>'.htmlspecialchars(curl_exec($ch)).'</pre><hr>'; ?> In my example above I want to get a directory listing of bussys, but instead I get a listing of the main (FTP root) directory.

    Read the article

  • MySQL index building performance

    - by Christian
    I tried to build an index over a two columns of a 30,000,000 entry database. I canceled the process after ~60hr as it didn't seem to work. For some reason MySQL takes only 22 mb ram instead of using the RAM fully. Is index building an operation that needs no Ram or is there some way to tell MySQL to use more RAM to be faster?

    Read the article

  • Google Maps: How to add HTML elements to specific coordinates ?

    - by Christian Toma
    I would like to know how and if I can add standard HTML elements (div, button) to a specific set of coordinates on the map ? For example I have a set of coordinates and I would like to attach a custom balloon notification to them and when I pan away from the coordinates the element should disappear and when I pan back to them, the element should reappear. Is it possible to do this with Google Maps ?

    Read the article

  • Monitor file selection in explorer (like clipboard monitoring) in C#

    - by Christian
    Hi, I am trying to create a little helper application, one scenario is "file duplication finder". What I want to do is this: I start my C# .NET app, it gives me an empty list. Start the normal windows explorer, select a file in some folder The C# app tells me stuff about this file (e.g. duplicates) How can I monitor the currently selected file in the "normal" windows explorer instance. Do I have to start the instance using .NET to have a handle of the process. Do I need a handle, or is there some "global hook" I can monitor inside C#. Its a little bit like monitoring the clipboard, but not exactly the same... Any help is appreciated (if you don't have code, just point me to the right interops, dlls or help pages :-) Thanks, Chris EDIT 1 (current source, thanks to Mattias) using SHDocVw; using Shell32; public static void ListExplorerWindows() { foreach (InternetExplorer ie in new ShellWindowsClass()) DebugExplorerInstance(ie); } public static void DebugExplorerInstance(InternetExplorer instance) { Debug.WriteLine("DebugExplorerInstance ".PadRight(30, '=')); Debug.WriteLine("FullName " + instance.FullName); Debug.WriteLine("AdressBar " + instance.AddressBar); var doc = instance.Document as IShellFolderViewDual ; if (doc != null) { Debug.WriteLine(doc.Folder.Title); foreach (FolderItem item in doc.SelectedItems()) { Debug.WriteLine(item.Path); } } }

    Read the article

  • Need to format character precedence in Strings.

    - by Christian
    I'm currently writing a Roman Numeral Converter for the fun of it. The problem works up to the aforementioned character precedence. Since Roman Numerals are not positional, i.e. III does not symbolize 1*whatever base^2 + 1*whatever base^1 + 1*whatever base^0. That of course makes it hard when somebody types in XIV and I need to make sure that the I is not added in this case, but rather subtracted. I'm not sure how to do this. What would be the best approach to tackle this? I have both the Roman Symbols and their respective decimal numbers stored in arrays: const char cRomanArray[] = "IVXLCDM"; const int romanArray[] = { 1, 5, 10, 50, 100, 500, 1000 }; so it wouldn't be too hard for me to brute-force the damn thing by simply checking the precedence within the array, i.e. if the symbol is smaller than the next symbol, i.e. in the exampe 'XIV' if 'I' is smaller than 'V', in which case it would be because I have ordered them in the array, then I could make it subtract the value instead of add. But this seems like a very ugly solution. Are there perhaps any better ones? I was thinking something along the lines of Regular Expressions maybe( forgive me if that sounds like a horrible idea, I haven't used RegExp yet, but it sounds like it could do what I need, and that's to determine the characters in a string.)

    Read the article

  • Searchable list of objects in Java

    - by Christian
    I want to create a large (~300,000 entries) List of self defined objects of the class Drug. Every Drug has an ID and I want to be able to search the Drugs in logarithmic time via that ID. What kind of List do I have to use? How do I declare that it should be searchable via the ID?

    Read the article

  • Comparison of music data

    - by Christian P.
    Hey I am looking for theory, algorithms and similar for how to compare music. More specifically, I am looking into how to dupecheck music tracks that have different bitrates or perhaps slightly different variations (radio vs album version), but otherwise sound the same. Use cases for this include services such as Grooveshark, Youtube, etc. where they get a lot of duplicate tracks. I am also interested in text comparisons (Britney Spers vs Britney Spears, how far they deviate, etc.) although this is secondary and I already have some sources to go on in this area. I am mostly interested in codec-agnostic comparison techniques and algoritms (assuming a "raw" stream), but codec-specific resources are appreciated. I am aware of projects such as musicbrainz.org, but have not investigated it further, and would be interested if such projects could be of help in this endeavor.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >